DIFFERENCE, INTERSECTION, and UNION array functions


These three new functions compare the content of two arrays.

  • DIFFERENCE: Returns an array of items that appear in the first array but not in the second array

  • INTERSECTION: Returns an array of items that appear in both arrays

  • UNION: Returns an array of items that appear in either array.

The contents of the returned arrays are unique (zero duplicates) and retain their original order, with the first array's content coming first.