Is it possible to map a value to a key using JOLT SPEC. MY input Json
{
"name": "Rj",
"Age" : "15"
}
Output Json as
{
"Rj" : {
"Age":"15"
}
}
Please provide a Json SPEC for above scenario
Is it possible to map a value to a key using JOLT SPEC. MY input Json
{
"name": "Rj",
"Age" : "15"
}
Output Json as
{
"Rj" : {
"Age":"15"
}
}
Please provide a Json SPEC for above scenario
Input
{
"name": "Rj",
"Age": "15"
}
Spec
[
{
"operation": "shift",
"spec": {
// @(1,name) -> go up 2 level, come back down and
// grab the value at "name" which is "RJ"
// Thus this evaluates to
// "Age" : "RJ.Age"
"Age": "@(1,name).Age"
}
}
]