I'm new to neo4j and cypher and am having trouble with grouping queries with 'WITH' and 'Collect', so i have this graph as shown in the image below :
The normal response that i get has many repeated values , so i want a json result that's formatted like the following:
processes:[
{
node,
subprocesses:[
{node , events: [
{node}
]
},
{ //
}
]
},
{
node,
subprocesses:[
{node , events: [
{node}
]
},
{ //
}
]
}
]
Is there a way to regroup the graph like this on cypher or not ? Thank in advance!!