We are using restassured for API automation in our project . I have sample response for which I tested JsonPath expression on https://www.jsonquerytool.com/. My Json expression is - $[*]['tags'][?(@.id==0)]. I am getting proper output when I tried expression on JsonQuerytool. But when I try same in below code , I get invalid expression message -
JsonPath jsonPathEvaluator = response.jsonPath();
ArrayList result = jsonPathEvaluator.get("$[*]['tags'][?(@.id==0)]");
Above code throws exception .
Can anyone tell me how can I programmatically query the response using JsonPathEvaluator ?
P.S - Response not pasted as it was very huge.