js iterate list of objects code example
Example 1: iterate object js
for (let key in yourobject) {
if (yourobject.hasOwnProperty(key)) {
console.log(key, yourobject[key]);
}
}
Example 2: iterate over array of object javascript and access the properties
for (let item of items) {
console.log(item); // Will display contents of the object inside the array
}