apoc.coll.pairs
Function APOC Core
apoc.coll.pairs([1,2,3]) returns [1,2],[2,3],[3,null]
Usage Examples
The following creates a list of lists of adjacent elements in a list:
RETURN apoc.coll.pairs([1,2,3,4,5]) AS output;
Output |
---|
[[1, 2], [2, 3], [3, 4], [4, 5], [5, null]] |
Was this page helpful?