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

# Tostring

# \$toString

The `$toString` operator converts a value to a string.

## Input

* A single value of any type

## Output

* The string representation of the input value

## Examples

### Convert Number to String

```json theme={null}
{
  "$toString": [
    123
  ]
}
```

Result: `"123"`

### Convert Boolean to String

```json theme={null}
{
  "$toString": [
    true
  ]
}
```

Result: `"true"`

### From Field

```json theme={null}
{
  "$toString": [
    {
      "$input": "value"
    }
  ]
}
```

Result: The string representation of the value field
