Skip to main content
Version: 3.3.0

flatten

Flatten nested JSON Objects and Arrays into a single JSON Object containing only top-level fields.

Field NameDescriptionTypeDefault
conditionOnly run this action if the condition the specified condition is metexpression-
fieldsThe list of fields that should be flattened if presentarray of fields-
all-fieldsFlatten all fields in the objectboolfalse
preserve-empty-arraysPreserve empty arraysbooltrue
preserve-empty-objectsPreserve empty objectsbooltrue
separatorSet the string to separate keys in the flattened objectstring-
warn-on-missingEmit a warning if a field is missing but was expected to be removedboolfalse

condition

Only run this action if the condition the specified condition is met

Type: expression

fields

The list of fields that should be flattened if present

Type: array of fields

all-fields

Flatten all fields in the object

Type: bool

preserve-empty-arrays

Preserve empty arrays

Type: bool

preserve-empty-objects

Preserve empty objects

Type: bool

separator

Set the string to separate keys in the flattened object

Type: string

warn-on-missing

Emit a warning if a field is missing but was expected to be removed

Type: bool