I\'d like to move a JSON object down one level using Jolt. Here\'s my input data :
{
\"rating\": {
\"primary\": {
\"value\": 3,
Spec
[
{
"operation": "shift",
"spec": {
"@": "NEWPARENT"
}
}
]
FYI, the "root" you are seeing is an artifact of the way that Jolt deals with the fact that the top level JSON input can be either a List or a Map, and that you want to be able to Transform a List into a Map (and vice versa).
So, jolt "wraps" the input so that it is "always" transforming a Map that has a single key "root", with a value that is the input.