← All tutorials

GoCareerGo Tutorials

MongoDB Tutorial

Documents, collections, CRUD, aggregation, Atlas and driver connectivity.

find()

The core read operation — returns a cursor over every document in a collection that matches a filter.

db.users.find({ age: { $gt: 25 } });
db.users.find({ city: 'London' }, { name: 1, _id: 0 }); // projection
db.users.find().sort({ name: 1 }).limit(10);