I want to validate r (Language, Year of Experience, House Number, City, Country, Mobile, Current Address) these field from the Json code. But I am getting error

Didn’t I answer this yesterday?

I want to validate these field but I am getting error - Help - Postman

Your language field validation is failing with undefined, as you are not targeting the array element properly.

It needs to be the following.

pm.test("Language field value validation", function () {
    pm.expect(jsonData.data.TechnicalDetails[0].language).to.eql(["Bangla", "English"]);
});

Same principle for the other assertions.

1 Like