$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
$lte
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.
Example
Consider an inventory
collection with the following documents:
The following operation uses the $ne
operator to determine if qty
does not equal 250
:
The operation returns the following results: