Thuta Learning
MongoDB
IntermediateData & DatabasesIntermediate

Query with Filters

MongoDBLesson 9

find() — you can filter records by passing a query filter document as its first parameter. The syntax is { <field>: <value> }.

javascript
// Find all documents where qty is 100
db.inventory.find( { qty: 100 } )
You should see
{ _id: ..., item: "paper", qty: 100, ... } { _id: ..., item: "canvas", 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.

Query with Filters | Thuta Learning