apoc.coll.containsAllSorted
Syntax |
|
||
Description |
Returns whether or not all of the given values in the second |
||
Arguments |
Name |
Type |
Description |
|
|
The sorted list to search for the given values. |
|
|
|
The list of values to check for existence of in the given list. |
|
Returns |
|
Usage examples
The following checks if a sorted collection contains all the values from another collection:
RETURN apoc.coll.containsAllSorted([1,4,5], [1,4]) AS output;
Output |
---|
TRUE |
This function will not work on unsorted collections, as shown in the example below:
RETURN apoc.coll.containsAllSorted([1,5,4], [1,4]) AS output;
Output |
---|
FALSE |
If we want to find values in an unsorted collection, see apoc.coll.containsAll.