apoc.coll.flatten
Function
apoc.coll.flatten(coll [Any], recursive Boolean)
- flattens the given list (to flatten nested lists, set recursive to true).
Signature
apoc.coll.flatten(coll :: LIST? OF ANY?, recursive = false :: BOOLEAN?) :: (LIST? OF ANY?)
Usage examples
The following flattens a collection of collections:
RETURN apoc.coll.flatten([1,2,3,[4,5,6]]) AS output;
Output |
---|
[1, 2, 3, 4, 5, 6] |
Was this page helpful?