Logical Operators

Operator

Description

Example

$and

Selects documents where all passed in conditions are met.

{“$and”: [{“c_bpm”: {“$gt”: 70}}, {“c_bpm”: {“$lt”: 100}}]}

$or

Selects documents where any passed in conditions are met.

{“$or”: [{“c_bpm”: {“$gt”: 70}}, {“c_bmi”: {“$gt”: 24.9}}]}

$not

Evaluates to true if the property or expression evaluates to false.

{“$not”: “c_active”}

$nor

Selects documents where none of the passed in conditions are met.

{“$nor”: [{“c_bpm”: {“$gt”: 70}}, {“c_bmi”: {“$gt”: 24.9}}]}