I have a json of type:
[{
"event": "click",
"status": "success",
"test": true
}
,
{
"event": "send",
"status": "success",
"test": true
}
,
{
"event": "checked",
"status": "failure",
"test": false
}]
I want to check if the event click was "success".
I am new to jsonpath expressions and I have tried doing this so far:
$.[?(@.event === 'click')].status
The above expression returns : [ success ]
but I am trying to do 'if an event named 'click' has a status 'success' then return true.