Mongo shall syntax- Chapter 2: The MongoDB Query Language + Atlas

I am trying to understand the mongo shall syntax be the documentation is not clear at least to someone novice like me.

This code for the questions from Chapter 2: The MongoDB Query Language + Atlas using count

db.movieDetails.find({"awards.wins: 2, awards.nominations: 2"}).count()

And I tied this:

db.movieDetails.find({"awards.wins": 2,  "awards.nominations": 2}).count()

Second query is correct
Please check mongo documentation

Query on Nested Field

To specify a query condition on fields in an embedded/nested document, use dot notation ( "field.nestedField" ).

NOTE

When querying using dot notation, the field and nested field must be inside quotation marks.

Hi @Mohammad_Alquraishi,

MongoDB query is basically a json object. Please refer these resources t o understand a little bit more about json structure :

This is basically a String. It’s not a key-value pair.

~ Shubham