"results":
[
{
"name": "xxx",
"Data": {
"id": 23
}
}
]
I have a json returning like this and I meet it with HashMap, but I can access the Data array. How can I get the id in the data array?
List<HashMap<String, Object>> personList = getCurrentResponse().jsonPath().getList("results");
for (HashMap<String, Object> person : personList ) {
if (person .get("name").equals(name)) {
int id= (int) (person .get("Data.id"));
return id;
I am getting NullException from the code sample above
getthe object keyed byData, and thengetthe object of that keyed byid.