I am using rest assured to test my API, I have an array list which contains date which I need to compare with JSON response, but I am not able to get all date values from the response
ArrayList<String> jsonElement = response.path("result[0].data[0].record.date");
I am getting records for the first array object only
Below is my JSON response
{
"statusCode": 200,
"result": [
{
"data": [
{
"record": [
{
"date": "2016-09-07T00:00:00.000000Z"
},
{
"date": "2016-07-07T00:00:00.000000Z"
},
{
"date": "2016-07-21T00:00:00.000000Z"
},
{
"date": "2017-03-31T00:00:00.000000Z"
},
{
"date": "2017-01-30T00:00:00.000000Z"
}
]
},
{
"record": [
{
"date": "2017-07-20T00:00:00.000000Z"
},
{
"date": "2017-08-07T00:00:00.000000Z"
},
{
"date": "2018-01-06T00:00:00.000000Z"
}
]
}
],
"id": "34567890"
}
]
}