a list of lists

MATCH (p)-->(c)
WITH p, collect(c) as children
RETURN collect([p, children])

or a list of maps

MATCH (p)-->(c)
WITH p, collect(c) as children
RETURN collect({parent:p, children:children})

or with pattern comprehensions


MATCH (p)
RETURN collect( [ (p)-->(c) | {parent:p, children:children} ] )

Cheers, Michael

Andrew perhaps sth for the KB ?

> Am 04.05.2017 um 18:35 schrieb Bastien Vigneron <[email protected]>:
> 
> Hello Mickael,
> 
> I hope you're well.
> I would like to get a list of list of nodes via something like « RETURN 
> COLLECT(p, COLLECT(c)) », I’ve tried many things and searching on Neo4j 
> official documentation but without success.
> 
> I put a small screenshot of subgraph concerned :
> 
> <Capture d’écran 2017-05-04 à 18.28.03.png>
> 
> We need to get the Mission (blue) node with all Period (green) nodes in a 
> list and for each Period node a list of People (yellow) that have accepted 
> the concerned Period.
> 
> Did you know if they have a way to do that ?
> 
> 
> 
> Bastien Vigneron
> Chief Technology Officer
> 
> <lm_logo.png>
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to