> For the complete documentation index, see [llms.txt](https://docs.cosmocloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cosmocloud.io/flow-builder/cql-cosmocloud-query-language/building-conditions/compound-operators/usdand.md).

# $and

`$and` operator lets you evaluate an **AND** 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).

`$and` will return true only if **all** sub-conditions return true.

## Syntax

```json
{
    "$and": [ <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
{
    "$and": [
        {
            "$.variables.age": {
                "$gte": 10
            }
        },
        {
            "$.variables.marks": {
                "$gt": 90
            }
        }
    ]
}
```

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