I have an response of an end point like this:
[
{
"bookingid": 767
},
{
"bookingid": 6767
},
{
"bookingid": 254
}
]
I wanted to verify that 254 is present within this array, I have used multiple approaches, but couldn’t find any response.
My Last Effort was this:
pm.test("Check BookingId is present", () => {
pm.response.json().each(Function(createdBookingID){
pm.expect(createdBookingID.bookingid).to.equal(254);
})
})
and I am getting response:
expected 767 to deeply equal 254
Let me know, what I am missing.