apoc.coll.contains
Function APOC Core
apoc.coll.contains(coll, value) optimized contains operation (using a HashSet) (returns single row or not)
Usage Examples
The following checks if a collection contains a value:
RETURN apoc.coll.contains([1,2,3,4,5], 4) AS output;
Output |
---|
true |
The following checks if a collection contains all the values from another collection:
RETURN apoc.coll.contains([1,2,3,4,5], [3,7]) AS output;
Output |
---|
false |