I’m newbie in jolt and I trying to transform the following JSON
Headers can be different in different json.
I really need a spec based on special characters like *,@,&,$
I’ll be eternally grateful for your help!
Input JSON :
[
{
"header1": null,
"header2": null,
"header3": null
},
{
"value1": null,
"value2": null,
"value3": null
},
{
"value4": null,
"value5": null,
"value6": null
}
]
Expected Output :
[
{
"header1": "value1",
"header2": "value2",
"header3": "value3"
},
{
"header1": "value4",
"header2": "value5",
"header3": "value6"
}
]
2
Answers
You can use the following shift transformation spec
the demo on the site http://jolt-demo.appspot.com/ is
You can solve this problem with 2 shift operations like the below: