Array Handling

Array handling is used to capture responses from a web service where multiple records are returned. It is also used to capture multiple matched results in a Form node.

Array Handling has been completely revamped in Studio 7.

In Studio 6, you needed to know the exact structure of the web service response in order to capture specific returned items. This was not easy, especially when the web service returned a nested JSON payload.

In Studio 7, as soon as you preview your web service response in an integration node, Studio will remember the entire payload. You can then access each item or find out the number of records returned using predefined functions in the expression builder. You don't have to create array variables to capture web service responses that return multiple records any more.

From a variable node, you then use the Get Array Length function to determine the number of records from the web service. The Get Element From JSON function will allow you to retrieve the value of a specific item within the JSON payload. Once you select the function, select the Integration node connecting to the web service from the drop down list. Once you select the Integration node, you can view the entire payload structure by clicking on the edit path field.

The following two videos show how to parse a web service response and extract items of interest.

How to process a web service response (basic)

In this example the web service returns a list of employees and their details. See how to set up Studio 7 to playback the names of employees in the list.

How to parse multiple records from a web service (Advanced)

In this example the web service returns a large list of employees and their details. See how to optimally set up Studio 7 to playback a subset of the names of employees in the list.