Flatten JSON

Last updated on May 30, 2023
Description: Iterates through all the properties of a JSON object and converts them into top level properties of the Event. Properties of nested json objects are also converted to top level properties.
Available Filters: Event Filters:
- Event Type
- Event Field

Field Filters:
- Field Name
- Field Value
Settings: None.
Transformation Considerations: The fields must be in valid JSON format, else an error is displayed.

Sample Transformation 1

Scenario: Separate the nested JSON fields of the JSON object, category, for all Events of the catalog.book Event Type.

Filters:

  • Event Type = catalog.book
  • Fields = All fields with name = category

Settings:
None.

Flatten JSON settings

Result: When you test the Transformation, each property of the category object is created as a property of the catalog.book Event.

Flatten JSON

Sample Transformation 2

Senario: Flatten the properties of the address JSON object and all nested objects within it, and convert these to top level Event properties.

Filters:
Event Type = Employee
Fields = All fields with name = address

Settings:
None.

Flatten nested JSON-settings

Result: When you test the Transformation, each field of the address object is created as a property of the Employee Event.

Flatten nested JSON


Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Jan-04-2023 NA Enhanced the content for clarity.
Nov-10-2022 NA Created as a new document.

Tell us what went wrong