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 can i put into graph a json record with inside records?

damisg7
Node Clone

Hi, let's assume that i have a json file like below:

{
"Laptop": "Lenovo",
"Price": "500$",
"Properties" : {
     "RAM": "4GB DDR4",
     "SSD": "500GB"
 }
}

How i can create the correct graph with the node A for the primary properties and the node B (connected to A) for the secondary properties inside the "Properties".

call apoc.load.json("...")
yield value
merge (a:Laptop{name:value.Laptop, price:value.Price})

Then what ??

1 ACCEPTED SOLUTION

ameyasoft
Graph Maven
Next Step:
merge (b:Properties{ssd: value.Properties.SSD, ram: value.Properties.RAM})

View solution in original post

1 REPLY 1

ameyasoft
Graph Maven
Next Step:
merge (b:Properties{ssd: value.Properties.SSD, ram: value.Properties.RAM})
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online