Skip to content

$or

Returns true when any expression in the array evaluates to a truthy value.

Syntax

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

Example

Input

{ "status": "pending", "manualOverride": true }

Stage

{
  "$project": {
    "shouldProcess": {
      "$or": [
        { "$eq": ["$status", "ready"] },
        "$manualOverride"
      ]
    }
  }
}

Output

{ "shouldProcess": true }