Skip to main content

JSON Splitter

The JSON Splitter component allows you to extract specific fields from JSON data and route them to different outputs. It's a powerful tool for parsing and distributing JSON data across your workflow.

Credit Cost

Free

Usage

The JSON Splitter component has a single input handle that accepts JSON text data, and multiple configurable output handles. Each output handle corresponds to a specific JSON field that you want to extract. The component will parse the incoming JSON data and send each selected field's value to its corresponding output handle.

Variable Handling

The JSON Splitter component accepts a single variable of type 'text' as input. The text must be valid JSON format. Each output handle produces a text variable containing the value of the selected JSON field.

If a specified JSON field is not found in the input data, or if the input is not valid JSON, the corresponding output handle will output empty data.

Properties

Identifier

  • Type: text
  • Description: The title of the component. Just for identification purposes, does not affect the workflow.

JSON Splits

  • Type: list of text fields
  • Description: A list of JSON field configurations, where each configuration creates a new output handle.
  • Fields per split:
    • Field Name: The name of the field you want to extract (e.g., "name", "address.city", "items[0]")

splitter-component

Here we can see a JSON Splitter possible configuration. We have two splits, one for the name and one for the email. The first output handle will output the extracted data for the name field, and the second output handle will output the extracted data for the email field.

Examples

Basic JSON Splitting

For a simple JSON input like:

{
"name": "John Doe",
"age": 30,
"email": "john@example.com"
}

You can configure splits to extract specific fields:

  1. Split Name: "name" → Output: "John Doe"
  2. Split Name: "email" → Output: "john@example.com"
  3. Split Name: "surname" → Output: [empty data]

Nested JSON Splitting

For nested JSON input:

{
"user": {
"personal": {
"name": "John Doe",
"age": 30
},
"contact": {
"email": "john@example.com",
"phone": "123-456-7890"
}
}
}

You can access nested fields using dot notation:

  1. Split Name: "user.personal.name" → Output: "John Doe"
  2. Split Name: "user.contact.email" → Output: "john@example.com"
  3. Split Name: "user.personal" → Output: "{ "name": "John Doe", "age": 30 }"