There are 2 methods in MongoDB find.
- find()
- findOne()
1. find()-
Select date in collection you used find().
Syntex-
db.collection.find({ <criteria> })
Example- Find all documents in the "users" collection where the age is 30
db.users.find({ age: 30 })
2. findOne()-
Get only one document, You can use the findOne() method.
Syntex-
db.collection.findOne({ <criteria> })