Array Operations
Use the Array Operations action to perform array operations such as split, concatenate, filter, pick, push, join, and reverse on the array.
Complete the following steps to use the Array Operations action in your workflow:
1. Click and drag the Array Operations action under Operations to the canvas, place the pointer on the action, and then or double-click the action. The Array Operations window opens.
2. Edit the Label, if needed. By default, the label name is the same as the action name.
3. In the Select Array Operation list, select one of the following operations, and perform its respective task:
Operation
Task
Concat—Concatenates two or more arrays into a single array.
a. Under the Add Source Array group, under the Source Array 1 section, in the Source Array field, enter an array or map an appropriate output of a previous action to provide an array.
b. Under the Add Source Array group, under the Source Array 2 section, in the Source Array field, enter an array or map an appropriate output of a previous action to provide an array.
Click Add to add multiple arrays. Click to delete any array that you added.
Filter—Defines filters to retrieve specific objects from the given array of objects.
* 
The Filter option works with first-level array elements only.
a. In the Source Array field, enter an array of objects or map an appropriate output of a previous action to provide an array of objects.
b. Click Show additional fields.
c. Under the Add Filters group, click Add, and do the following:
a. In the Input field, enter the name of the property on which you want to apply the filter, or map the output of a previous action to provide the array property.
b. In the Set Filter list, select an appropriate conditional filter.
Click Add to add multiple filters. Click to delete any filter that you added.
d. Under the Add Advanced Filters group, click Add, and do the following:
a. In the Input field, enter the name of the property on which you want to apply the filter, or map the output of a previous action to provide the array property.
b. In the Condition list, select an appropriate conditional filter.
c. In the Expected field, enter the expected value for the input property.
Click Add to add multiple filters. Click to delete any filter that you added.
Join—Converts all array elements into a single string using the specified join operator.
a. In the Source Array field, enter the array of elements that you want to join as a single string.
b. In the Join By field, enter the join operator that you want to use.
Pick—Retrieves values associated with the specified property from the given array of objects.
a. In the Source Array field, enter an array of objects or map an appropriate output of a previous action to provide an array of objects.
b. Click Show additional fields.
c. Under the Add Pick Properties group, click Add, and in the Pick Property field, enter the name of the property for which you want to retrieve values.
Click Add to add multiple properties. Click to delete any property that you added.
Push—Appends specified items to the end of the given array.
a. In the Source Array field, enter the source array to which you want to add elements.
b. Click Show additional fields.
c. Under the Add Items group, click Add, and do the following:
In the Type field, select the type of item that you want to append to the array..
In the Value field, enter the value of the item.
Click Add to add multiple items. Click to delete any item that you added.
Reverse—Reverses the order of the array elements.
In the Source Array field, enter the array that you want to reverse.
Split—Splits the given array into the specified number of parts.
a. In the Source Array field, enter an array or map an appropriate output of a previous action to provide an array.
b. In the Split Into field, specify the number of parts that you want to split the array into. If an array has 2 items only and you specify the value of this field as 3, then the third array will be empty. You can specify any value up to 100.
c. Click Show additional fields.
d. In the Round Robin Divide list, select true to split the array in round robin fashion; otherwise, select false.
For example, if the source array is set to ["US","UK","Canada","India","Australia"], the Split Into field is set to 3, and the Round Robin Divide is set to False, then this action returns the following output:
[["US", "UK"], ["Canada", "India"], ["Australia"]]
However, for the same array, if you set Round Robin Divide to true, then this action returns the following output:
["US", "India"], ["UK", "Australia"], ["Canada"]
4. Click Done.
This video demonstrates how to work with arrays when defined in any workflow.
Output schema
Was this helpful?