Skip to content

Zip json array

Description

The Zip JSON Array activity merges multiple JSON array columns into a single array of objects. Each object in the output array contains one element from each selected input array, zipped together by index.

This is particularly useful when you have separate arrays for related data (e.g., names and values) and want to create a combined object structure for easier downstream use.


Input

Input TypeFormatDescription
DataTableShould contain at least two columns with JSON arrays to zip together.

Output

Output TypeFormatDescription
DataTableOriginal data with an added column of zipped arrays

Configuration Fields

Field NameDescriptionRequired
Column NameA list of two or more column names that contain JSON arrays to zip.Yes
Output ColumnThe name of the new column that will store the zipped array of objects.Yes

All specified columns must contain arrays of equal or compatible lengths.
If the lengths vary, only the common range of indexes will be used to zip.


Sample Input

productidproductnameprojectmixsalesmix
201Laptop[“Alpha”, “Beta”, “Gamma”][120, 134, 150]
202Laptop[“Physics”, “Beta”, “Bio”][120, 159, 163]
203Laptop[“Alpha”, “Beta”, “Gamma”][120, 134, 150]

Sample Configuration

FieldValue
Column Name["projectmix", "salesmix"]
Output ColumnZip

Sample Output

productidproductnameprojectmixsalesmixZip
201Laptop[“Alpha”, “Beta”, “Gamma”][120, 134, 150][{“projectmix”:“Alpha”,“salesmix”:120},{“projectmix”:“Beta”,“salesmix”:134},{“projectmix”:“Gamma”,“salesmix”:150}]
202Laptop[“Physics”, “Beta”, “Bio”][120, 159, 163][{“projectmix”:“Physics”,“salesmix”:120},{“projectmix”:“Beta”,“salesmix”:159},{“projectmix”:“Bio”,“salesmix”:163}]
203Laptop[“Alpha”, “Beta”, “Gamma”][120, 134, 150][{“projectmix”:“Alpha”,“salesmix”:120},{“projectmix”:“Beta”,“salesmix”:134},{“projectmix”:“Gamma”,“salesmix”:150}]