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