cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to load nested json in neo4j

Hi Team,

I am unable to load nested JSON to neo4j using apoc. Please find the steps and errors below.

DATA

Error

3 REPLIES 3

Hi @kushwah.raja1

Whenever a variable is mentioned with a '$' at its start, Neo4j interprets it as a parameter and hence in your query above as well, it expects $props is referring to a parameter 'props' and not to the variable mentioned on line 3 of your query.

Regarding loading nested data from json into Neo4j, check these-

Regards.

Thanks for the reply.

But in my case, the JSON file is very big. So finding it difficult to write the CQL.

Please find the data link below

JSON DATA

Hi @kushwah.raja1

Have you tried the apoc library?, to maybe import the json data in a list form that might make it easier to create a cypher query around it.

Below link has some examples that might give you some idea to proceed.

Looking at your query and at the data you have attached, I am a bit confused as to why you want to load all the json as a single property on a Patient node. Ideally there would be different aspects of the json that should go into different components that in turn connect to each other through relationships, to fully utilize the graph.
Apologies if I misunderstood your design and requirement, but just trying to suggest the best option.

Regards.