> ## 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.

# Gt

# \$gt

The `$gt` operator checks if the first value is greater than the second value.

## Input

* An array containing exactly two values to compare

## Output

* `true` if the first value is greater than the second value
* `false` otherwise (including when either value is null)

## Examples

### Basic Comparison

```json theme={null}
{
  "$gt": [
    10,
    5
  ]
}
```

Result: `true`

### False Comparison

```json theme={null}
{
  "$gt": [
    3,
    7
  ]
}
```

Result: `false`

### Field Value Comparison

```json theme={null}
{
  "$gt": [
    {
      "$input": "age"
    },
    18
  ]
}
```

Result: `true` if the age field is greater than 18, otherwise `false`

### String Comparison

```json theme={null}
{
  "$gt": [
    "zoo",
    "apple"
  ]
}
```

Result: `true` (lexicographic comparison)
