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

# Uuid

# \$uuid

The `$uuid` operator generates a UUID based on the specified version.

## Input

* A single integer value specifying the UUID version (currently supports 1 and 4)

## Output

* A string representation of the generated UUID

## Examples

### Generate UUID Version 4

```json theme={null}
{
  "$uuid": [
    4
  ]
}
```

Result: A UUID string like "550e8400-e29b-41d4-a716-446655440000"

### Generate UUID Version 1

```json theme={null}
{
  "$uuid": [
    1
  ]
}
```

Result: A UUID string like "7d444840-9dc0-11d1-b245-5ffdce74fad2"

### From Field

```json theme={null}
{
  "$uuid": [
    {
      "$input": "version"
    }
  ]
}
```

Result: A UUID generated using the version specified in the version field
