how to iterate through all the value of an object in an array code example
Example 1: how to loop trough an object java script
// Looping through arrays created from Object.keys
const keys = Object.keys(fruits)
for (const key of keys) {
console.log(key)
}
// Results:
// apple
// orange
// pear
Example 2: iterate through object array javascript
for (var key in array) {
var obj = myArray[key];
// ...
}