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

GetDynamicDataRowsFromJsonObjectProperty

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

Get Dynamic Data Rows From JSON Object Property converts a JSON object property (specified by name) into a List of Dynamic Data Rows. The selected property must contain a JSON array of arrays. 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 is received in an object wrapper (for example, an API response with multiple properties), and one property contains row-style data that needs to be processed as tabular records. The resulting Dynamic Data Rows can be used for looping through records, mapping values into other structures, or exporting results (for example, to CSV/Excel).

Configuration consists of providing the JSON object as a string and the property name that contains the target array. The step extracts the array from the specified property and returns Dynamic Data Rows with generated column names based on position.

Important:
The selected property must contain a JSON array of arrays. If the property contains an array of objects (for example, [{"id":1},{"id":2}]) or is not an array, the step throws a BusinessRule exception and cannot convert the entries to Dynamic Data Rows.

Properties

Inputs

PropertyDescriptionData Type
Array Property NameThe name of the JSON property in Json Object that contains the target array of arrays to convert into Dynamic Data Rows.String
Json ObjectA string containing a JSON object.String

Outputs

PropertyDescriptionData Type
GetDynamicDataRowsFromJsonObjectProperty1_Output
A List of Dynamic Data Rows created from the JSON array found at the specified property. Each inner array becomes one Dynamic Data Row. Column names are generated by position 0.List of DynamicDataRows

Example Inputs and Outputs

InputOutput

Array Property Name: data2

Json Object:

{ "data1": [["Region","Sales"],["East",120],["West",95]], "data2": [["Fruit","Color"],["Apple","Red"],["Grapes","Green"],["Banana","Yellow"]] }

Output:

[ {"Item 1":"Fruit","Item 2":"Color"}, {"Item 1":"Apple","Item 2":"Red"}, {"Item 1":"Grapes","Item 2":"Green"}, {"Item 1":"Banana","Item 2":"Yellow"} ]