How to check for the property in Chai inside the array of objects

How to check for the property in Chai inside the array of objects. Say my array of objects is like

const myObj = [ {fName: 'abc', lName: 'xyz'}, {fName: 'efg', lName: 'lmn'}, ... ]

I want to check each object must have the property fName and lName irrespective of their value!

Source: Ask Javascript Questions

LEAVE A COMMENT