Hi @amitj1jan
Spec:
[
{
"operation": "shift",
"spec": {
"*": "[]"
}
}
]
I am here trying to iterate through every key of the input json at the root, i.e., * takes valules "0","1","2",... Now, I am taking the entire content at every iteration and pushing it to the empty array.
When * points to 0, Entire value inside "0" will be appended into empty array. Next, when * points to 1,entire content inside "1" will be added into the same array. Similarly for the remaining.
But, if the input is not in order and you want 6th(say) element to be inserted at 6th position of output, try the following spec:
[
{
"operation": "shift",
"spec": {
"*": "[&]"
}
}
]