Created 04-28-2020 01:03 AM
[
{
"name": "adam",
"age": 12,
"address": {
"city": "delhi",
"country": "india",
"zip": "110011"
}
},
{
"name": "louis",
"age": 23,
"address": {
"city": "goa",
"country": "india",
"zip": "110022"
}
}
]
After applying jolt transformation i want to get the following output
DESIRED OUTPUT.JSON
[
{
"name": "adam",
"age": 12,
"address": {
"current_city": "delhi", //change here
"current_country": "india", //change here
"zipode": "110011" //change here
}
},
{
"name": "louis",
"age": 23,
"address": {
"current_city": "goa", //change here
"current_country": "india", //change here
"zipode": "110022" //change here
}
}
]
Can you please help me with the jolt spec. thanks.
Created 06-14-2020 06:32 AM
[
{
"operation": "shift",
"spec": {
"*": {
"address": {
"city": "[&2].address.current_city",
"country": "[&2].address.current_country",
"zip": "[&2].address.zipcode"
},
"*": "[&1].&"
}
}
}
]
Created 06-14-2020 06:32 AM
[
{
"operation": "shift",
"spec": {
"*": {
"address": {
"city": "[&2].address.current_city",
"country": "[&2].address.current_country",
"zip": "[&2].address.zipcode"
},
"*": "[&1].&"
}
}
}
]