Reputation: 85
I need to create a pretty simple jolt transformation to convert the following json:
{
"pfr_item": [
{
"field1": "value1"
},
{
"field2": "value2"
}
]
}
Into the following one:
[{
"field1": "value1"
},
{
"field2": "value2"
}
]
I've been having a look at some jolt examples and trying to create my own shift transformation for a while but can't make it work. Can anyone help me with this?
Upvotes: 0
Views: 338
Reputation: 2116
You can try this JSON Spec
[
{
"operation": "shift",
"spec": {
"*": {
"*": "[]"
}
}
}
]
Upvotes: 2