---
title: "arrayUnion"
canonical: "https://support.appfire.com/space/PSCONF/15302887/arrayUnion"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | arrayUnion(arrayName1, arrayName2) | **Package** | array |
> | **Alias** |  | **Pkg Usage** | union(arrayName1, arrayName2) |

## Description

> Macro (excerpt)
> 
> Union between two arrays.

Union between two arrays.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | arrayName1 | Array | Yes | First array. |
> | arrayName2 | Array | Yes | Second array. |

## Return Type

**Array**

## Example

```javascript
string[] developers= usersInGroups({"jira-developers"});
string[] administrators = usersInGroups({"jira-administrators"});
return arrayUnion(developers, administrators);
```

The result returned by the routine is an array that contains the unique elements from developers and administrators.

## See also

> Macro (contentbylabel)