join

The join task joins all elements of an array (or an array-like object) into a string.

Potential use case

If you have a dataset within an array and you want to join it into a single string of information, use the join task.

Properties

IncomingTypeDescription
arrArrayRequired. The array that contains the elements to join.
separatorStringSpecifies a string to separate each pair of adjacent elements of the array.
OutgoingTypeDescription
joinedElementsStringA string with all array elements joined. Returns an empty string if the length of the array is zero.

Example

In this example the arr variable is ["Device1", "Device2", "Device3", "Device4"] and the separator is a comma (,).

Array input with four device names
Separator configured as a comma

The joinedElements variable that returns is "Device1,Device2,Device3,Device4" — all elements separated by a comma within one set of double quotation marks.

Output showing all devices joined into a single comma-separated string

For related information, see the join API reference.