Use the findOne() method to fetch just a single matching document.
javascript
db.inventory.findOne( { item: "paper" } )You should see
{ _id: ObjectId("..."), item: 'paper', qty: 100, tags: [ 'white', 'blank' ] }MongoDBLesson 8
Use the findOne() method to fetch just a single matching document.
db.inventory.findOne( { item: "paper" } ){ _id: ObjectId("..."), item: 'paper', qty: 100, tags: [ 'white', 'blank' ] }Updated on
Progress is saved only in this browser on this device. It isn't synced to other devices.
Report a problem with this lessonOpens your email app with this lesson's address filled in — nothing is sent until you send it.