Skip to content

$gte

Returns true when the first expression evaluates greater than or equal to the second.

Syntax

{ "$gte": [ <expression1>, <expression2> ] }

Example

Input

{ "score": 70 }

Stage

{ "$project": { "passed": { "$gte": ["$score", 70] } } }

Output

{ "passed": true }