I am trying to jolt transformation spec for the below input :
{
"a": {
"serviceTesta": "Testa1",
"b": {
"serviceTestb": "Testb1",
"c": [
{
"name": "x",
"value": "100",
"desc": "this is description of X"
},
{
"name": "y",
"value": "200",
"desc": "this is description of y"
}
]
}
}
}
and the expected output is as below :
[
{
"Testa1_Testb1_x": "100",
"Testa1_Testb1_x_desc": "this is description of X"
},
{
"Testa1_Testb1_y": "100",
"Testa1_Testb1_y_desc": "this is description of y"
}
]
My Spec :
[
{
"operation": "shift",
"spec": {
"a": {
"b": {
"c": {
"*": {
"value": "@(4,serviceTesta).@(3,serviceTestb)@(1,name)"
}
}
}
}
}
}
]
I am new to jolt , tried different ways , but couldnt get desired output. Any help is highly appreciated.
Thank you