Powered By GitBook
INTERSECTION
Intersection of two lists

Description

Returns a list that contains only values that are present in the both of the given lists. If there are no equal values in lists then an empty list is returned.
The equality of values is similarly than in IS\_EQUAL function.

Function signature

1
INTERSECTION(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":"Jack","age":32},{"name":"Jon","age":32},{"name":"Kate","age":30}]
Copied!
Formula
Return value
INTERSECTION(numbers1, numbers2)
[10,55,85]
INTERSECTION(numbers2, numbers1)
[55,85,10]
INTERSECTION(array1, array2)
[{"name":"Kate","age":30},{"name":"Jack","age":32}]
Last modified 10mo ago
Export as PDF
Copy link