Have Questions?  Need Expert Answers?  JOIN LUNCH N' LEARNS!

GetDynamicDataRowsFromJSONArray

Prev Next
Step Details
Introduced in Version9.19.0
Last Modified in Version9.19.0
LocationData > JSON

Get Dynamic Data Rows From Json Array converts a JSON array of arrays into a List of Dynamic Data Rows. Each inner array is treated as a single “row,” and each value in that row is mapped to a generated column name (Item 1, Item 2, Item 3, and so on).

This step is useful when JSON data needs to be handled as tabular rows for downstream processing, such as iterating through records, mapping values into other data structures, or exporting results (for example, to CSV/Excel).

Configuration consists of providing a JSON string that represents an array where each element is also an array (for example, [["A","B"],["C","D"]]). The step returns Dynamic Data Rows with generated column names based on position.

Important:
This step does not convert a JSON array of objects (for example, [{"id":1},{"id":2}]). If the top-level array contains objects rather than arrays, the step throws a BusinessRule exception indicating that the entries cannot be converted to Dynamic Data Rows.

Properties

Inputs

PropertyDescriptionData Type
String With Json Array

A string containing JSON formatted as an array of arrays. Each inner array is treated as one row, and each value in the inner array becomes a generated column (Item 1, Item 2, etc.).

Not supported: JSON arrays where the elements are objects (for example, [{"id":1}]).

String

Outputs

PropertyDescriptionData Type
GetDynamicDataRowsFromJsonArray1_Output

A List of Dynamic Data Rows created from the input JSON. Each inner array becomes one Dynamic Data Row. Column names are generated by position 0.

List of DynamicDataRows

Example Inputs and Outputs

InputOutput
stringWithJsonArray: "[["Fruit","Color"],["Apple","Red"],["Grapes","Green"],["Banana","Yellow"]]"

Output : [ 

0 : { Item 1: "Fruit" Item 2: "Color" } 

1 : { Item 1: "Apple" Item 2: "Red" } 

2 : { Item 1: "Grapes" Item 2: "Green" } 

3 : { Item 1: "Banana" Item 2: "Yellow" }