- Reference >
- Operators >
- Aggregation Pipeline Operators >
- $ne (aggregation)
$ne (aggregation)¶
On this page
Definition¶
-
$ne
¶ Compares two values and returns:
true
when the values are not equivalent.false
when the values are equivalent.
The
$ne
compares both value and type, using the specified BSON comparison order for values of different types.$ne
has the following syntax:For more information on expressions, see Expressions.