MongoDB Query Language (MQL) Comparison Query Operators
Comparison query operators compare field values against specified values to filter documents. These operators enable you to perform equality, greater than, less than, and range-based comparisons, forming the foundation of query filtering logic for retrieving documents that meet specific criteria.
$cmp
The $cmp operator compares two values
$eq
The $eq query operator compares the value of a field to a specified value
$gt
The $gt query operator retrieves documents where the value of a field is greater than a specified value
$gte
The $gte operator retrieves documents where the value of a field is greater than or equal to a specified value
$in
The $in operator matches value of a field against an array of specified values
$lt
The $lt operator retrieves documents where the value of field is less than a specified value
$lte
The $lte operator retrieves documents where the value of a field is less than or equal to a specified value
$ne
The $ne operator retrieves documents where the value of a field doesn't equal a specified value
$nin
The $nin operator retrieves documents where the value of a field doesn't match a list of values