Thuta Learning
IntermediateData & Databasesintermediate

Find All Documents

Relax. We'll talk through this in plain words — no textbook voice.

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, ... } ...
Find All Documents | Thuta Learning