Powered By GitBook
UNION
Union two lists

Description

Combines the two lists returning a list that contanis unique values from the both given lists. In other words, the returned list contains no duplicate values.
The equality of values is similarly than in IS\_EQUAL function.

Function signature

1
UNION(list1: Array, list2: Array) => Array
Copied!
Parameter
Description
List 1
The first list
List 2
The second list

Examples

1
numbers1 = [10,55,66,54,85,91]
2
numbers2 = [52,55,85,10,94]
3
array1 = [{"name":"Kate","age":30},{"name":"Jack","age":32},{"name":"Kate","age":25}]
4
array2 = [{"name":"Jane","age":22},{"name":"Jon","age":32},{"name":"Kate","age":30}]
Copied!
Formula
Return value
UNION(numbers1, numbers2)
[10,55,66,54,85,91,52,94]
UNION(numbers2, numbers1)
[52,55,85,10,94,66,54,91]
UNION(array1, array2)
[{"name":"Kate","age":30},{"name":"Jack","age":32},{"name":"Kate","age":25},{"name":"Jane","age":22},{"name":"Jon","age":32}]
Last modified 10mo ago
Export as PDF
Copy link