Action: flatten
Flatten nested JSON Objects and Arrays into a single JSON Object containing only top-level fields.
Field Summary
Field Name | Type | Description | Default |
---|---|---|---|
condition | expression | Only run this action if the condition the specified condition is met | - |
fields | array of fields | The list of fields that should be flattened if present | - |
all-fields | bool | Flatten all fields in the object | false |
preserve-empty-arrays | bool | Preserve empty arrays | true |
preserve-empty-objects | bool | Preserve empty objects | true |
separator | string | Set the string to separate keys in the flattened object | - |
warn-on-missing | bool | Emit a warning if a field is missing but was expected to be removed | false |
Fields
condition
Type: expression
Only run this action if the condition the specified condition is met
fields
Type: array of fields
The list of fields that should be flattened if present
all-fields
Type: bool
Default: false
Flatten all fields in the object
preserve-empty-arrays
Type: bool
Default: true
Preserve empty arrays
preserve-empty-objects
Type: bool
Default: true
Preserve empty objects
separator
Type: string
Set the string to separate keys in the flattened object
warn-on-missing
Type: bool
Default: false
Emit a warning if a field is missing but was expected to be removed