apoc.coll.partition
Function
apoc.coll.partition(coll [Any], batchSize Integer)
- partitions the original list into sub-lists of the given batch size.
The final list may be smaller than the given batch size.
Usage examples
The following partitions a list into sublists of size 2
:
CALL apoc.coll.partition([1,2,3,4,5], 2);
Value |
---|
[1, 2] |
[3, 4] |
[5] |
Was this page helpful?