MATCH p = (u:User)-[rel]->(u2:User) RETURN COLLECT(p) as list
generates listPath.prettyPrinted.json
MATCH (u:User)-[rel:KNOWS]->(u2:User) RETURN COLLECT(rel) as list
generates listRel.prettyPrinted.json
{ | |
"list": [ | |
[{ | |
"id": 0, | |
"type": "relationship", | |
"label": "KNOWS", | |
"properties": { | |
"since": 1993 | |
}, | |
"start": { | |
"id": 0, | |
"labels": ["User"], | |
"properties": { | |
"born": "2015-07-04T19:32:24", | |
"name": "Adam", | |
"place": { | |
"crs": "wgs-84", | |
"latitude": 33.46789, | |
"longitude": 13.1, | |
"height": null | |
}, | |
"age": 42, | |
"male": true, | |
"kids": ["Sam", "Anna", "Grace"] | |
} | |
}, | |
"end": { | |
"id": 1, | |
"labels": ["User"], | |
"properties": { | |
"name": "Jim", | |
"age": 42 | |
} | |
} | |
}] | |
] | |
} |
{ | |
"list": [{ | |
"id": 0, | |
"type": "relationship", | |
"label": "KNOWS", | |
"properties": { | |
"since": 1993 | |
}, | |
"start": { | |
"id": 0, | |
"labels": ["User"] | |
}, | |
"end": { | |
"id": 1, | |
"labels": ["User"] | |
} | |
}] | |
} |
MATCH p = (u:User)-[rel]->(u2:User) RETURN COLLECT(p) as list
generates listPath.prettyPrinted.json
MATCH (u:User)-[rel:KNOWS]->(u2:User) RETURN COLLECT(rel) as list
generates listRel.prettyPrinted.json