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

# Contains

# \$contains

The `$contains` operator checks if the first string contains the second string as a substring.

## Input

* An array containing exactly two string values: the main string and the substring to search for

## Output

* `true` if the first string contains the second string as a substring
* `false` otherwise

## Examples

### Contains Substring

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

Result: `true`

### Does Not Contain

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

Result: `false`

### Field Value

```json theme={null}
{
  "$contains": [
    {
      "$input": "description"
    },
    "urgent"
  ]
}
```

Result: `true` if the description field contains the word "urgent", otherwise `false`
