Here is the JSON Response:
[{
"startTime": "2020-07-21T15:20:00.000+00:00",
"endTime": "2020-07-21T15:40:00.000+00:00",
"availabilities": [{
"availabilityId": "eyJJZCI6MTA4N",
"startTime": "2020-07-21T15:20:00.000+00:00",
"endTime": "2020-07-21T15:40:00.000+00:00",
"channel": "PHONE",
"programId": "Msff",
"providerDetails": {
"firstName": "abc",
"lastName": "abc",
"providerTitle": "NURSE"
}
}]
}, {
"startTime": "2020-07-21T15:40:00.000+00:00",
"endTime": "2020-07-21T16:00:00.000+00:00",
"availabilities": [{
"availabilityId": "eyJJZCI6MTA4NDM2MiwiU3RhcnRUa",
"startTime": "2020-07-21T15:40:00.000+00:00",
"endTime": "2020-07-21T16:00:00.000+00:00",
"channel": "PHONE",
"programId": "Msff",
"providerDetails": {
"firstName": "def",
"lastName": "def",
"providerTitle": "NURSE"
}
}]
}]
And here is the check i am using to extract the first "availabilityId" from json response
check(
jsonPath("$[0][availabilities].[0].availabilityId") saveAs "availabilityId"
)
but i am getting error:
jsonPath($[0][availabilities].[0].availabilityId).find.exists extraction crashed: end of input expected
I validated the path on https://jsonpath.com/, i am able to see the result. What am i doing wrong?