Read nested json

Hi, there is an issue you should consider in your model. Currently, It is not possible to add nested property as a property (path values). So you may have to create separate nodes.

UNWIND ['13171.json'] as filename
CALL apoc.load.json(filename) YIELD value AS v
WITH v.nets as nets
UNWIND nets as net
WITH net
MERGE (Net:NetNode {name: net.name})
	FOREACH (xyz in net.path | MERGE (Net)-[:has_xyz]->(:XYZ {x: xyz.x, y: xyz.y, z:xyz.z}))

If you unpack your XYZ values into separate nodes you can get something like that.

2 Likes