Showing results for 
Search instead for 
Did you mean: 

Import json data by using APOC [HELP]

Dear developers please help me!
I want to import json data into neo4j database. Now this is my data in Mongodb.

I want to import like that:

Here is my cipher SQL:

CALL apoc.load.json("file:///data.json")
yield values unwind values as value
merge (general_info:Company {id:})
on create set =,
			  general_info.form =,
              general_info.type =,
              general_info.numberOfOwner =,
              general_info.companyLocation =,
              general_info.registerDate =
with value.stakeHolders as stakeHolder
merge (stake:Person {id: stakeHolder.last_name+'.'+stakeHolder.first_name})
on create set stake.firstName = stakeHolder.first_name,
			  stake.lastName = stakeHolder.last_name,
              stake.category = stakeHolder.category,
              stake.registeredDate =
merge (stake)-[rel:OWNED]->(general_info)
with as ceos
merge (cc:Person {id: ceos.last_name+'.'+ceos.first_name})
on create set cc.firstName = ceos.first_name,
			  cc.lastName = ceos.last_name,
              cc.category = ceos.category,
              cc.registeredDate =
merge (cc)-[rel1:CEO]->(general_info)
with value.area as areas
merge (arr:Area {id: areas.code})
on create set arr.title = areas.title,
			  arr.registeredDate =
return values

Graph Fellow

Hi @nyamkhuu.bu ,

did you had a chance to try MongoDB - APOC Documentation ?

Graph Steward

Do you have sample JSON data you're trying to import (in which case I'll try to take a look) or are you trying to import directly from MongoDB (which I know nothing about)?