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


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

## Description

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

Union between two arrays.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| arrayName1 | Array | Yes | First array. |
| arrayName2 | Array | Yes | Second array. |

## Return Type

**Array**

## Example

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

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

## See also

> Macro (contentbylabel)