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

# Split

# \$split

The `$split` operator splits a string into an array of substrings based on a separator.

## Input

* An array containing exactly two string values: the input string and the separator

## Output

* An array of substrings created by splitting the input string at each occurrence of the separator

## Examples

### Basic Split

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

Result: `["apple", "banana", "orange"]`

### Split by Space

```json theme={null}
{
  "$split": [
    "Hello World Test",
    " "
  ]
}
```

Result: `["Hello", "World", "Test"]`

### Field Value

```json theme={null}
{
  "$split": [
    {
      "$input": "tags"
    },
    ","
  ]
}
```

Result: An array of tags split by commas from the tags field
