Anonymous Array

The Anonymous Array feature allows users to toggle between an object and an array schema in the Input and Output tabs of a workflow. This flexibility ensures that workflows can handle dynamic data structures efficiently, adapting to scenarios where arrays are required instead of objects.


Configuring Anonymous Arrays

The Input and Output tabs in the workflow provide a toggle option to switch the schema body from an object to an array. This toggle is particularly useful when working with data structures that involve lists or collections.

Steps to Enable Anonymous Arrays

  1. Navigate to the Input or Output Tab

    • Open the workflow and go to either the Input or Output tab, depending on where you need to configure the schema.

  2. Locate the Toggle

    • In the schema configuration area, find the Toggle option that allows switching between Object and Array modes.

  3. Switch to Array

    • Turn on the toggle to enable the array schema. This will change the schema body from an object structure to an array structure.

  4. Save Changes

    • After configuring the schema as an array, save your workflow to apply the changes.


Behavior of Anonymous Arrays

When the schema is toggled to an array, the following changes occur

  1. Structure Change

    • The schema changes from a single object representation to a collection format, allowing multiple items to be processed as part of an array.

  2. Dynamic Compatibility

    • The array schema enables seamless handling of data sets, such as lists of objects or values, without requiring predefined array keys.


Example Use Case

Scenario

A workflow needs to process a list of user details, such as multiple user objects containing name, email, and age.

Steps

  1. Configure the Input Tab schema to enable the array toggle.

  2. Map the incoming data as an array of objects

    jsonCopy code[
        {
            "name": "John",
            "email": "[email protected]",
            "age": 30
        },
        {
            "name": "Jane",
            "email": "[email protected]",
            "age": 25
        }
    ]
  3. In the Output Tab, ensure that the schema is also toggled to handle arrays if required.

Last updated

Was this helpful?