I want to transform my json into another json with jolt. I have the following JSON :
{
"centre": [
{
"name": "A",
"accesses": [
{
"name": "a",
"totalInputs": 140,
"totalOutputs": 77
},
{
"name": "b",
"totalInputs": 1374,
"totalOutputs": 1068
}
]
},
{
"name": "B",
"accesses": [
{
"name": "c",
"totalInputs": 610,
"totalOutputs": 511
}
]
}
]
}
and I want to extract information from diferent levels of the tree and form a list of jsons. This is my expected output:
[
{
"center": "A",
"accesses": "a",
"totalInputs": 140,
"totalOutputs": 77
},
{
"center": "A",
"accesses": "b",
"totalInputs": 1374,
"totalOutputs": 1068
},
{
"center": "B",
"accesses": "c",
"totalInputs": 610,
"totalOutputs": 511
}
]
