I want to check as key value pair “EmailId”: “[email protected]” in api response body. Below is my respose of api and I need to check value of EmailID and Recipient name as key value pair. I have verified the status as .expect('json', 'Result.Status', 2)
but it is not working for recipient name as .expect('json', 'Result.Recipients.RecipientName', 'Test User')
. Currently I am using .expect('bodyContains', '[email protected]')
for verifying email id.
JSON: {
"IsRequestSuccessful": true,
"Error": null,
"Result": {
"Status": 2,
"CompletedTimestamp": null,
"Recipients": [
{
"RecipientId": "28660b54-641d-4fec-9841-721d34c175c7",
"RecipientName": "Test User",
"EmailId": "[email protected]",
"ContactType": 2,
"Status": 2,
}
]
}
}