Read
Query for all the docs in the people collection that have a name field with a value of 'Tom':
Or just the first one:
You can also specify which fields to return by passing a field selection parameter. The following will exclude the _id field and only include the age field:
Note: by default, the _id field will be returned, even if you don't ask for it. If you would like not to get the _id back, you can just follow the previous example and ask for the _id to be excluded by specifying _id: 0 (or _id: false).If you want to find sub record like address object contains country, city, etc.
& specify field too if required

Anil Bist
Skills Mongodb
Qualifications :- High School - SLV, College/University - Graphic Era Deemed Univ University,Location :-Dehradun,Dehradun,Uttarakhand,India
Description:-
I started my Professional Journey in 2006 with one of the Web Development Company in Bangalore and my 1st framework was "Ruby on Rail" as Web development and delivered around 5+ Projects using this platform. Then came another dimension as JEE/Sturst framework, Gradually I realized that I want to build something on my own and give my passion and energy on creating something different a
Explore