Google News
logo
MongoDB - Interview Questions
How to perform queries in MongoDB?
The find method is used to perform queries in MongoDB. Querying returns a subset of documents in a collection, from no documents at all to the entire collection. Which documents get returned is determined by the first argument to find, which is a document specifying the query criteria.
 
Example :

> db.users.find({"age" : 24})
Advertisement