need to transform based on the element value input.json
{
"Result": {
"owner": {
"name": "test user"
},
"Components": [
{
"id": "123-456-789"
}
],
"123-456-789": {
"temp": {
"emip": "abc",
"teto": "123"
}
}
}
}
transform json
[
{
"operation": "shift",
"spec": {
"Result": {
"Components": {
"*": {
"id": "compId"
}
},
"compId": {
"@": "component"
}
}
}
},
{
"operation": "default",
"spec": {
"compId": null
}
}
]
output expected to be
"123-456-789": {
"temp": {
"emip": "abc",
"teto": "123"
}
}
but the result answer is below , when I hard code the value with 123-456-789 then I get the value but I need to take the value dynamically.
{
"compId" : "123-456-789"
}