Search code snippets, questions, articles... Chrome Extension

Get nodes using multiple ids Cypher query neo4j

To get multiple nodes using multiple ids, you can use the below code. It will filter the nodes based on the ids provided in the WHERE clause.
MATCH (n)
WHERE ID(n) IN [0, 1, 7, 8, 10]
RETURN n
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

In the above Cypher query, we are getting nodes that have 0, 1, 7, 8, and 10 unique ids. The query will search all nodes that exist in the neo4j graph database and returns the matching nodes from them based on the ids.

Was this helpful?
0 Comments
Join Devsheet Ask a Question