Return multiple relationships as one in cypher
Consider a query where one can get from node A to node D, you have to go through a couple of relationships, for example.
(:Person)-[:LIVES_IN]->(:State)-[:HAS]->(:Parks)
and I wanted to return on the fly all the possible Parks to which a person can go to their state without returning the state itself in the query so that the returned ratio looks like
(:Person)-->(:Parks)
In other words, like this:
What does the request look like?
Thank you for your time!
+3
source to share
2 answers