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