Closed Prasaddiwalkar closed 1 year ago
[
{
"operation": "shift",
"spec": {
"userData": {
"*": {
"userId": "data.[&1].ID",
"*": "data.[&1].&",
"zipCode": {
"#custom-field1": "data[#3].address[#2].property",
"@": "data[#3].address[#2].value"
},
"street": {
"#custom-field2": "data[#3].address[#2].property",
"@": "data[#3].address[#2].value"
},
"city": {
"#custom-field3": "data[#3].address[#2].property",
"@": "data[#3].address[#2].value"
},
"country": {
"#custom-field4": "data[#3].address[#2].property",
"@": "data[#3].address[#2].value"
}
}
}
}
},
{ // get rid of null components of the array
"operation": "modify-overwrite-beta",
"spec": {
"*": "=recursivelySquashNulls"
}
}
]
I am news to jolt json transformation. So looking for help in transforming nested json having list of values to nested json with list as following.
Input json
Jolt Specification
Output
Expected json