Comparison Operators

OperatorDescriptionExample
$cmpReturns 0 if the two passed in array values are equivalent, 1 if the first value is greater than the second, -1 if the second value is greater than the first.{“$cmp”: [“name.first”, {“$string”: “Jamie”}][“name.first”, {“$string”: “Jamie”}]}
$gtSelects documents where the value of the property is greater than the passed in value.{“c_bpm”: {“$gt”: 70}}
$gteSelects documents where the value of the property is greater than or equal to the passed in value.{“c_bpm”: {“$gte”: 70}}
$ltSelects documents where the value of the property is lesser than the passed in value.{“c_bpm”: {“$lt”: 70}}
$lteSelects documents where the value of the property is lesser than or equal to the passed in value.{“c_bpm”: {“$lte”: 70}}
$neReturns true if the first property or expression in the passed in not equivalent to the second.{“$ne”: [“c_bpm”, {“$integer”: 100}][“c_bpm”, {“$integer”: 100}]}