> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metrics-man.com/llms.txt
> Use this file to discover all available pages before exploring further.

# And

# \$and

The `$and` operator evaluates multiple expressions and returns `true` if all of them are truthy, otherwise it returns `false`.

## Input

* An array of expressions to evaluate
* Each expression is evaluated in order from left to right

## Output

* `true` if all expressions evaluate to truthy values
* `false` if any expression evaluates to a falsy value

## Examples

### Basic Example

```json theme={null}
{
  "$and": [
    true,
    true
  ]
}
```

Result: `true`

### Multiple Expressions

```json theme={null}
[
  {
    "$and": [
      {
        "$gte": [
          {
            "$input": "age"
          },
          18
        ]
      },
      {
        "$eq": [
          {
            "$input": "status"
          },
          "active"
        ]
      }
    ]
  }
]
```

Result: `true` if the age is greater than or equal to 18 and the status is "active", otherwise `false`

### With Falsy Value

```json theme={null}
{
  "$and": [
    true,
    false,
    true
  ]
}
```

Result: `false`
