cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to get list from "MATCH" clause?

I want to get the list form of the result of match and use the result to do the following logic judgement...
But how can I get the list form from "match" result? it seems to be the single node satisfied the given pattern.

E.g.

match(n:things)

node with things label has property name, how can I get the n.name in list format?

1 ACCEPTED SOLUTION

Try this:

match(n:things)
return collect(distinct n.name)

View solution in original post

2 REPLIES 2

Try this:

match(n:things)
return collect(distinct n.name)

thank you
it works