how to import json data in neo4j how to import json data in neo4j json json

how to import json data in neo4j


You can use jq to manipulate your data into CSV format and then use the LOAD CSV command.


Neo4J doesn't have a native way of doing this, but there is a plugin for Neo4J called apoc.load.json. You can load data doing the following:

CALL apoc.load.json("file:///<path_to_file>/example.json") YIELD value as documentUNWIND document.root AS rootMERGE (e:ExampleNode {id: root.id})...

You can find more information on the plug here: https://neo4j-contrib.github.io/neo4j-apoc-procedures/. I've recently used this and found it to be quite intuitive.