How to get properties from a nested object inside of an already nested object in tests?

Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.

Here’s an outline with best practices for making your inquiry.

My question: How to grab a value from a nested object inside of an already nested object and see if it is equal to the expected error message

Details (like screenshots):

How I found the problem:

I’ve already tried:
pm.test(“name no good”,function () {

let response = pm.response.json();

let name = _.get(response, 'errorResult.errorMessages')

pm.expect(name.name).to.contain("'Name' must not be empty.")

}); and
pm.test(“name no good”,function () {

let response = pm.response.json();

let name = _.get(response, 'errorResult.errorMessages.name')

pm.expect(name).to.eql("'Name' must not be empty.")

});