I have the following JSON file "test.json":
{
"Environment": {
"Environment_elements": [{
"name": "weather",
"id": "1",
},
{
"name": "enemy",
"id": "2",
},
{
"name": "external_operator",
"id": "3",
}
],
"System_element": {
"name": "weapons_system",
"id": "4",
},
"Connections": [{
"name": "weather_connection",
"id": "4",
"source": "1",
"target": "4",
},
{
"name": "enemy_location_connection",
"id": "5",
"source": "2",
"target": "4",
},
{
"name": "external_operator_connection",
"id": "6",
"source": "3",
"target": "4",
}
]
}
}
I want to create a graph like this:
After reading the Json using the apoc.load.json(URL) procedure , what query do I write to get the graph as in the picture? I am having problems understanding how to UNWIND the nested objects.