If you're querying for a single document, prefer findOne
over find
Usecase:
To find a user by an email field
One possible approach:
User.find({email: 'shubworkmail@gmail.com'});
Better Approach:
User.findOne({email: 'shubworkmail@gmail.com'});
Top comments (0)