Given a Map state thats output is an array similar to the following:
[
{
"ProcessState": {
"Status": "SUCCESS"
}
},
{
"ProcessState": {
"Status": "SUCCESS"
}
},
{
"ProcessState": {
"Status": "FAILURE"
}
}
]
I would like to be able to test if there is an element with Status = 'FAILURE'. I attempted to use a Choice with a choice as follows:
{
"Variable": "$..ProcessState[?(Status == FAILURE)]",
"IsPresent": true,
"Next": "Items Contained Failure"
}
When attempting this I get Value is not a Reference Path: Illegal '..' ...
I'm thinking to attempt to use a Pass as an intermediate step, but I think that's just going to fail that it can't find anything if no entries match.