Reputation: 395
I have the following input json, which has an array of json:
{
"ArrayList": [
{
"a": "value1",
"b": "value2",
"c": "value3"
},
{
"a": "value4",
"b": "value5",
"c": "value6"
},
{
"a": "value7",
"b": "value8",
"c": "value9"
}
]
}
And the desired output is :
{
"ArrayList": [
{
"a": "value1",
"b": "value2"
},
{
"a": "value4",
"b": "value5"
},
{
"a": "value7",
"b": "value8"
}
]
}
What will be the Jolt transform spec expression for this?
Upvotes: 0
Views: 249
Reputation: 65373
Seems you want to remove the attribute c of objects of the ArrayList array, then a remove transformation might be used such as
[
{
"operation": "remove",
"spec": {
"ArrayList": {
"*": {
"c": ""
}
}
}
}
]
Upvotes: 1