MongoDB Boolean Operators
MongoDB Boolean operators are a set of special operators used for performing logical operations, including logical AND, OR, NOT, etc. They can be used for conditional filtering in both aggregation and regular queries. This page summarizes the Boolean operators available in MongoDB.
-
$and
The MongoDB$andoperator is used to combine multiple conditions to form a logical “AND” relationship. -
$not
The$notoperator is an operator in the MongoDB query language that is used to negate a query condition in a query. -
$or
The$oroperator is an operator in MongoDB used to perform logical OR operations on multiple conditions.