Mapping an Array of Objects
Mapping an array of objects in the input to an array of identical objects in the output schema is a two step process. Map the array root first and then map each individual element within the object separately. Only the mapped elements will be included in the input.
To create a single item array, configure the
array.forEach() function in the expression mapper for the array. You can then configure mappings for the items in that array. Any combination of the following can be used in an item mapping:
To iterate over an array from the output of previous activities or trigger, configure
array.forEach(<source array>) function in the expression mapper for the array. This will create an array of the same size as the source array. You can then configure mappings for the elements in that array. Any combination mentioned above can be used in an item mapping.
In the example below
[ ] Passenger is an array of objects. Each record (object) in
Passenger has multiple properties that are of different data types, for example every customer has a property named “ID” which is of type number, a property named “Single” which of type boolean and so on. We map the
Passenger input array to the output of the same array from the trigger in the flow.
To map these arrays, follow these steps:
Procedure
Related tasks
Copyright © Cloud Software Group, Inc. All rights reserved.