apoc.coll.removeAll

Details

Syntax

apoc.coll.removeAll(list1, list2)

Description

Returns the first LIST<ANY> with all elements also present in the second LIST<ANY> removed.

Arguments

Name

Type

Description

list1

LIST<ANY>

The list to remove values from.

list2

LIST<ANY>

The values to remove from the given list.

Returns

LIST<ANY>

Usage examples

The following returns first list with all elements of second list removed:

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

[1, 2, 6, 6]