Doubt about sintax

I have a doubt with sintax. For example, in the $and condition:

Syntax : { $and: [ { <expression1> }, { <expression2> } , ... , { <expressionN> } ] }

If I am building a query, and i am inside an object (but not the first part of the sentence), ¿I must create a new object to embeed the and or is not necessary?

Could you give me a mnemonic rule to not forget the right sintax.

Thank you!

A query is a JSON object. The same syntax has to be follow.

The operator $and is the key of an array of objects. Each objects within the array has to be a valid JSON object.

Hi @Antonio_Ubeda_Montero,

I hope you found @steevej-1495’s response helpful. Let me know if you still have any questions.

~ Shubham