We can apply conditional parameters while retrieving data from collections, such as IN, AND, and OR with less than and greater than conditions:
- Apply the IN condition: We can set filter parameters so the query can match values from a given set and retrieve values from collections where documents match values from a given set. The syntax for the in parameter is the following:
{<field 1> : {<operator 1> : <value 1>},....}
The following query will return all the documents from user_profiles where the first name is John or Kedar:
Here, we get all the documents with a firstName ...