apoc.coll.zipToRows
Syntax |
|
||
Description |
Returns the two |
||
Input arguments |
Name |
Type |
Description |
|
|
The list to zip together with |
|
|
|
The list to zip together with |
|
Return arguments |
Name |
Type |
Description |
|
|
A zipped pair. |
Usage examples
The following examples demonstrate how to zip two lists together in APOC and Cypher:
apoc.coll.zipToRows
WITH [1, 2, 3] AS list1, ["a", "b", "c"] AS list2
CALL apoc.coll.zipToRows(list1, list2)
YIELD value
RETURN value
Cypher’s UNWIND
WITH [1, 2, 3] AS list1, ["a", "b", "c"] AS list2
UNWIND range(0, size(list1) - 1) AS i
RETURN [list1[i], list2[i]]
value |
---|
[1, "a"] |
[2, "b"] |
[3, "c"] |