These docs are for v1.0. Click to read the latest docs for v1.2.

DIFFERENCE

Takes two arrays, treated as sets (i.e. ignoring duplicate values), and returns a new array that contains all items from the first array that are not in the second array.

Syntax

=DIFFERENCE(array1, array2)

Examples

=DIFFERENCE([1, 2, 3], [3, 4, 5])[1, 2]
=DIFFERENCE(["A", "B"], [1, 2])["A", "B"]
=DIFFERENCE(["A", "B", "B"], [1, 2])["A", "B"]
=DIFFERENCE([OBJECT("A", 1), OBJECT("B", 1)], [OBJECT("A", 1)])[{"B": 1}]