my json response looks like this:
`
{
“resultCode”: “SUCCESS”,
“errorCode”: null,
“errorMessage”: null,
“membershipCoupons”:
[
{
“membershipId”: “32059336”,
“coupons”:
[
{
“offerId”: “000C297765971EE4A8C22C6999211BA4”,
“description”: “Gift1”,
“graphics”:
[
{
“width”: 400,
“height”: 200,
“quality”: “Low”,
“url”: “https://site/02_201504_003/000C297765971EE4A8C22C6999211BA4Low.jpg”
},
{
“width”: 900,
“height”: 600,
“quality”: “High”,
“url”: “https://site/02_201504_003/000C297765971EE4A8C22C6999211BA4High.jpg”
}
],
“endTime”: 1425168000000,
“activationDate”: null,
“redemption”: null
},
{
“offerId”: “000C297765971EE4A8C22C6999221BA4”,
“description”: “Gift2”,
“graphics”:
[
{
“width”: 400,
“height”: 200,
“quality”: “Low”,
“url”: “https://site/02_201504_003/000C297765971EE4A8C22C6999221BA4Low.jpg”
},
{
“width”: 900,
“height”: 600,
“quality”: “High”,
“url”: “https://site/02_201504_003/000C297765971EE4A8C22C6999221BA4High.jpg”
}
],
“endTime”: 1425168000000,
“activationDate”: null,
“redemption”: null
},
`
For now I use this to get all the offerIds into my 'itemlist:
`
.check(jsonPath("$.membershipCoupons[?(@.membershipId=='${MemberId}')].coupons[?(@.activationDate==null)].offerId").findAll.optional.saveAs("itemList"))
`
Just to test I need to get just the first offered from the json.
Is it possible to have several clauses within the:
`
coupons[?(@.activationDate==null)].offerId
`
I could say:
`
coupons[0].offerId
`
But then I cannot evaluate if the activationdate==null.
could I say:
`
coupons[0?(@.activationDate==null)].offerId
`
or something similar?
Thanks!