> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# join

> Use the join task to join all elements of an array into a single string.

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

| Incoming    | Type   | Description                                                                 |
| :---------- | :----- | :-------------------------------------------------------------------------- |
| `arr`       | Array  | Required. The array that contains the elements to join.                     |
| `separator` | String | Specifies a string to separate each pair of adjacent elements of the array. |

| Outgoing         | Type   | Description                                                                                          |
| :--------------- | :----- | :--------------------------------------------------------------------------------------------------- |
| `joinedElements` | String | A 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 (`,`).

![](/_fern-img/dde91da3b726a1f0524c4699e230c1583b3d23eb3bea6fcebe380d1da866d1a5.webp)![](/_fern-img/0c0fd87794818cfc1d8e0cf93c2f0a4e76a385c70bbc05e1bbb42506bfd174c7.webp)

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

![](/_fern-img/114271572d69c1941a4840bd45dddc20084fc450309d25395e39d949610a9000.webp)

## Related reading

For related information, see the [join API reference](https://apidocs.itential.com/api/app-workflow_engine/join/).