Transforms

Field Access Special Cases

Handling Fields with Dots(.) in Names

When dealing with fields that contain a dot (".") in their name, always encapsulate the key in quotes to differentiate it from nested field access.

Example 1: Top-level fields

Given this data:

{
  "user.name": "alice",
  "user_age": 30
}

To refer to user.name use "user.name"

Example 2: Nested fields

Given this data:

{
  "request": {
    "headers": {
      "x.forwarded.for": "203.0.113.1"
    }
  },
  "status": 200
}

To refer to nested x.forwarded.for use request.headers."x.forwarded.for"

Last updated

Was this helpful?