Hi all,
Running into a situation where I need to remove elements in an array when a certain value is empty. Thought I could use a value remover in my transformer with an JMESPath Expression (result[?id = ``]), but that does not seem to work.
In this case a need to remove an object in an array whenever the id of this object is null or empty.
Input:
{
"result" : [
{
"id": "001",
"value": "vaue 001"
},
{
"id": null,
"value": "vaue 002"
},
{
"id": "003",
"value": "vaue 003"
}
]
}
Expected Result:
{
"result" : [
{
"id": "001",
"value": "vaue 001"
},
{
"id": "003",
"value": "vaue 003"
}
]
}
Help would be appreciated!