While extracting data from JsonPath object getting a null,below is the json response data
{
"status": "OK",
"header": {
"headerAttributes": {}
},
"errors": [],
"payload": {
"totalCount": 0,
"returnTerms": []
}
}
java method for extracting value from "totalCount"
public void getjsonValue() {
JsonPath jsonPathEvaluator = response.jsonPath();
System.out.println(jsonPathEvaluator.get("$['payload']['totalCount']"));
}