apoc.convert.toNodeListFunction
Syntax |
|
||
Description |
Converts the given value into a |
||
Arguments |
Name |
Type |
Description |
|
|
The value to covert into a node list. |
|
Returns |
|
||
Example
Given this dataset:
CREATE (:Person {name: 'Alice'}), (:Person {name: 'Bob'})
The following query uses apoc.convert.toNodeList to cast a generic list to a LIST<NODE>:
MATCH (n:Person)
WITH collect(n) AS people
RETURN apoc.convert.toNodeList(people) AS nodes
| nodes |
|---|
[(:Person {name: "Alice"}), (:Person {name: "Bob"})] |