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