apoc.coll.pairWithOffset
Function
apoc.coll.pairWithOffset(coll LIST<ANY>, offset INTEGER)
- returns a LIST<ANY>
of pairs defined by the offset.
Usage examples
The following returns a list of pairs defined by the offset:
RETURN apoc.coll.pairWithOffset([1,2,3,4], 2) AS value
value |
---|
[[1,3],[2,4],[3,null],[4,null]] |
It works also as procedure:
CALL apoc.coll.pairWithOffset([1,2,3,4], 2)
value |
---|
[1,3] |
[2,4] |
[3,null] |
[4,null] |