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

# Min

# \$min

The `$min` operator returns the smaller of two values. If the values are of numeric type, it compares them numerically. If they are strings, it performs lexicographic comparison.

## Input

* An array containing exactly two values to compare

## Output

* The smaller of the two input values

## Examples

### Numeric Comparison

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

Result: `5`

### String Comparison

```json theme={null}
{
  "$min": [
    "apple",
    "banana"
  ]
}
```

Result: `"apple"`

### Field Value Comparison

```json theme={null}
{
  "$min": [
    {
      "$input": "temperature_today"
    },
    {
      "$input": "temperature_yesterday"
    }
  ]
}
```

Result: The lower temperature between today and yesterday
