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' ] }Relax. We'll talk through this in plain words — no textbook voice.
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' ] }