Thuta Learning
MongoDB
IntermediateData & DatabasesIntermediate

Find All Documents

MongoDBLesson 7

To fetch every document in a collection, call find() with an empty query filter ({}).

javascript
db.inventory.find( {} )
You should see
{ _id: ..., item: "journal", qty: 25, ... } { _id: ..., item: "notebook", qty: 50, ... } { _id: ..., item: "paper", qty: 100, ... } ...

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.

Find All Documents | Thuta Learning