Skip to main content

$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

{
  "$uuid": [
    4
  ]
}
Result: A UUID string like “550e8400-e29b-41d4-a716-446655440000”

Generate UUID Version 1

{
  "$uuid": [
    1
  ]
}
Result: A UUID string like “7d444840-9dc0-11d1-b245-5ffdce74fad2”

From Field

{
  "$uuid": [
    {
      "$input": "version"
    }
  ]
}
Result: A UUID generated using the version specified in the version field