I select a path and want to return distinct nodes from that path with labels:
match path = ...
unwind(nodes(path)) as node
return distinct node { .*, type: labels(node)}
As a result I get
[{node={a:1, b:2, type=[t]}}, {node={a:3, b:4 type=[x]}}]
i want to get rid of the node
text and receive:
[{a:1, b:2, type=[t]}, {a:3, b:4 type=[x]}]
how can i achieve that?
neo4j version 3.3.1:
docker run --rm -p 7474:7474 --env=NEO4J_AUTH=none neo4j:3.3.1
(Update:) the solution in your question seems to be working fine.
Originally, I was suggesting to use the
properties
function, but that overcomplicates things unnecessarily: