Hey, I am trying to import a JSON, so I have to use UNWIND to get the data, but Iget no result after making an specific UNWIND.
This is the JSON:
{
"objects": [
{
"id": "R1",
"part1": {
"text": "Globally"
},
"part2": {
"text": "if {R}, then {S} in {T} time",
"components": [
{
"actioner": {
"text": "A || B",
"type": "R",
"variables": [
{
"variable": {
"name": "A",
"type": "inputs"
}
},
{
"variable": {
"name": "B",
"type": "constants"
}
}
]
}
},
{
"actioned": {
"text": "C==B",
"type": "S",
"variables": [
{
"variable": {
"name": "C",
"type": "constants"
},
"variable": {
"name": "B",
"type": "constants"
}
}
]
}
},
{
"time": {
"text": "CONST_TIME",
"type": "T",
"variables": [
{
"variable": {
"name": "CONST_TIME",
"type": "constants"
}
}
]
}
}
]
}
}
]
}
And this is the Cypher command:
CALL apoc.load.json("example.json") YIELD value AS json
UNWIND json.objects AS objects
UNWIND objects.part1 AS part1
UNWIND objects.part2 AS part2
UNWIND part2.components as components
UNWIND components.actioner AS actioner
Then if I do a return of anything I get the expected results:
return actioner
But if I add the next Cypher line it doesn´t work, I get a empty result:
CALL apoc.load.json("example.json") YIELD value AS json
UNWIND json.objects AS objects
UNWIND objects.part1 AS part1
UNWIND objects.part2 AS part2
UNWIND part2.components as components
UNWIND components.actioner AS actioner
> UNWIND components.actioned AS actioned
And if I ask to return actioner or actioned or anything I don't get any result.
This is what I get:
Could anybody help me?
Thank you!