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?

Try this:

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

thank you :smile:
it works