SQL Reference
FIND
db.collection.find(query, projection)
Section titled “db.collection.find(query, projection)”- query: A document specifying the selection filter using query operators. Omit it or pass {} to match all documents.
- projection: A document specifying which fields to return. Use 1 to include a field and 0 to exclude one.
Example
Section titled “Example”db.users.find({ age: { $gt: 21 } }, { name: 1, age: 1 })