# $or

`$or` operator lets you evaluate an **OR** condition between 2 or more conditions to be compared with each other. These sub-conditions can be both [<mark style="color:blue;">**Simple Conditions**</mark>](/flow-builder/cql-cosmocloud-query-language/building-conditions.md#simple-condition) or [<mark style="color:blue;">**Compound Conditions**</mark>](/flow-builder/cql-cosmocloud-query-language/building-conditions.md#compound-condition).  You can use this in any [<mark style="color:blue;">**Conditional Objects**</mark>](/flow-builder/cql-cosmocloud-query-language/building-conditions/conditional-operators.md).

`$or` will return true only if **any of** the sub-conditions return true.

## Syntax

```json
{
    "$or": [ <cond>, <cond>, ...]
}
```

### Properties

| Field   | Description                                                                                                           | Required |
| ------- | --------------------------------------------------------------------------------------------------------------------- | -------- |
| \<cond> | <p>A nested Simple Condition object or Compound Condition object.<br><br>This can also be a Magical Autocomplete.</p> | true     |

## Examples

Let's say we have declared a variable `age` in our API flow, which has a value of **20** currently and a variable `marks` with value 80.

```json
{
    "$or": [
        {
            "$.variables.age": {
                "$gte": 10
            }
        },
        {
            "$.variables.marks": {
                "$gt": 90
            }
        }
    ]
}
```

The above expression would resolve to **true**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cosmocloud.io/flow-builder/cql-cosmocloud-query-language/building-conditions/compound-operators/usdor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
