Skip to main content

JSON Array

The JSON Array node provides operations for manipulating JSON arrays. Use it to sort, filter, deduplicate, flatten, slice, and transform arrays within your workflow data.

Actions​

ActionDescription
jsonArray:sortSort array elements by a field
jsonArray:filterFilter array elements by a condition
jsonArray:mapTransform each element using a mapping
jsonArray:reduceReduce an array to a single value
jsonArray:flattenFlatten nested arrays
jsonArray:uniqueRemove duplicate elements
jsonArray:sliceExtract a portion of the array
jsonArray:reverseReverse the order of elements
jsonArray:findFind the first element matching a condition
jsonArray:countCount elements, optionally with a filter

jsonArray:sort​

Sorts array elements by a specified field.

Parameters

ParameterTypeRequiredDescription
inputarrayYesArray to sort
fieldstringYesField name to sort by
orderstringNoasc or desc. Defaults to asc

jsonArray:filter​

Returns elements that match the specified condition.

Parameters

ParameterTypeRequiredDescription
inputarrayYesArray to filter
fieldstringYesField to evaluate
operatorstringYesComparison operator: equals, notEquals, greaterThan, lessThan, contains, startsWith, endsWith, isNull, isNotNull
valueanyConditionalValue to compare against

jsonArray:map​

Transforms each element by selecting, renaming, or computing fields.

Parameters

ParameterTypeRequiredDescription
inputarrayYesArray to transform
mappingsarrayYesArray of field mapping objects
mappings[].fromstringYesSource field name
mappings[].tostringYesTarget field name

jsonArray:reduce​

Reduces an array to a single value by applying an operation across all elements.

Parameters

ParameterTypeRequiredDescription
inputarrayYesArray to reduce
fieldstringYesField to aggregate
operationstringYesAggregation: sum, min, max, avg, concat

jsonArray:flatten​

Flattens nested arrays into a single-level array.

Parameters

ParameterTypeRequiredDescription
inputarrayYesArray with nested arrays
depthintegerNoMaximum depth to flatten. Defaults to 1. Use -1 for full flatten

jsonArray:unique​

Removes duplicate elements from an array.

Parameters

ParameterTypeRequiredDescription
inputarrayYesArray to deduplicate
fieldstringNoField to use for uniqueness comparison. If omitted, compares entire elements

jsonArray:slice​

Extracts a portion of the array.

Parameters

ParameterTypeRequiredDescription
inputarrayYesArray to slice
startintegerYesStart index (zero-based)
endintegerNoEnd index (exclusive). If omitted, slices to the end

jsonArray:reverse​

Reverses the order of elements in an array.

Parameters

ParameterTypeRequiredDescription
inputarrayYesArray to reverse

jsonArray:find​

Returns the first element that matches the condition.

Parameters

ParameterTypeRequiredDescription
inputarrayYesArray to search
fieldstringYesField to evaluate
operatorstringYesComparison operator
valueanyYesValue to match

jsonArray:count​

Counts elements in the array, optionally filtered by a condition.

Parameters

ParameterTypeRequiredDescription
inputarrayYesArray to count
fieldstringNoField to filter on
operatorstringNoComparison operator for filtering
valueanyNoValue for the filter

Connection​

No connection required. This is a data transformation node.

Output​

For reduce, the result is a single value. For find, the result is a single object (or null). For count, the result is an integer. For all other actions, the result is an array.