apoc.coll.disjunction

Details

Syntax

apoc.coll.disjunction(list1, list2)

Description

Returns the disjunct set from two LIST<ANY> values.

Arguments

Name

Type

Description

list1

LIST<ANY>

The list of values to compare against list2 and form a disjunction from.

list2

LIST<ANY>

The list of values to compare against list1 and form a disjunction from.

Returns

LIST<ANY>

Usage examples

The following returns the unique disjunction of two lists:

RETURN apoc.coll.disjunction([1,2,3,4,5], [3,4,5]) AS output;
Results
Output

[1, 2]