How to filter by boolean value in JSONPath expression?
I'm using this site which fails to validate my expression and I am looking for an explanation why: https://jsonpath.curiousconcept.com/#
My JSON is
{
"whatever" : {
"best" : {
"reward" : "true"
}
}
}
And my expression, which fails to match (in Gatling, not validator site), is either of these:
$.whatever.best[?(@.reward=='true')]
$.whatever.best[?(@.reward==true)]
This expression works fine:
$.whatever.best.reward
And strangely, this works:
$..*[?(@.reward==true)]
What is wrong? Please no guesses. I provided the site in order to verify your answer.
The instructions here did not help me: https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html#filters