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

# Startswith

# \$startsWith

The `$startsWith` operator checks if the first string starts with the second string.

## Input

* An array containing exactly two string values: the main string and the prefix to check

## Output

* `true` if the first string starts with the second string
* `false` otherwise

## Examples

### Starts With

```json theme={null}
{
  "$startsWith": [
    "Hello, world!",
    "Hello"
  ]
}
```

Result: `true`

### Does Not Start With

```json theme={null}
{
  "$startsWith": [
    "Hello, world!",
    "world"
  ]
}
```

Result: `false`

### Field Value

```json theme={null}
{
  "$startsWith": [
    {
      "$input": "filename"
    },
    "report_"
  ]
}
```

Result: `true` if the filename field starts with "report\_", otherwise `false`
