$not
Returns the logical negation of the supplied expression.
Syntax
{ "$not": [ <expression> ] }
Example
Input
{ "isDeleted": false }
Stage
{ "$project": { "isActive": { "$not": ["$isDeleted"] } } }
Output
{ "isActive": true }
Returns the logical negation of the supplied expression.
{ "$not": [ <expression> ] }
{ "isDeleted": false }
{ "$project": { "isActive": { "$not": ["$isDeleted"] } } }
{ "isActive": true }