I have my assertion written like this:
pm.expect(response.validations.Result).to.eql("valid");
With it I am trying to test if the Result is valid, But I am unsure how to get through the "0: {...}" level Postman considers it as undefined - "Check if request is successful | AssertionError: expected undefined to deeply equal 'valid'"
The response structure looks like that:
{jobStatus: "success", startDateTime: "10/28/2022 11:39:23 AM", endDateTime: "10/28/2022 11:39:33 AM"…}
jobStatus: "success"
startDateTime: "10/28/2022 11:39:23 AM"
endDateTime: "10/28/2022 11:39:33 AM"
validations: [1]
0: {…}
Type: "duplicates"
Result: "valid"
So any ideas what is this "0: {...}" is and how to work with the path "validations -> 0:{...} -> Results and check if the Result is valid?
pm.expect(response.validations.Result).to.eql("valid");
I have tried response.validations{0} or {...} , I have tried using dots, quotes, round brackets, curly brackets, and nothing worked so far.