Skip to main content

Flatten Deep

Flattens arrays into individual elements. Non-array values pass through unchanged.

component image

In-ports

input <any> — Accepts any data type. Arrays will be flattened, other types pass through.

Out-ports

output <any> — Emits individual elements from input arrays, or the original value for non-arrays.

Overview

The Flatten Deep component takes an input array and emits each element separately as individual values. If the input is not an array, it passes through unchanged.

flatten deep example

Quick Example:

  • Input: [1, 2, 3]
  • Output: Three separate emissions: 1, 2, 3

Key Behaviors:

  • Arrays are flattened into individual elements
  • Non-array values (strings, numbers, objects, null) pass through untouched
  • Each array element becomes a separate output event
  • Maintains data types of individual elements

Common Use Cases:

  • Converting batched data into individual items for processing
  • Breaking down grouped results for individual handling
  • Streaming individual records from batch responses

Settings

No additional configuration is required.

Error Handling

Errors from the input stream are passed through to the output stream unchanged. The component does not generate its own errors during normal operation.

  • Iterator — For iterating over data structures