js loop over object and array code example
Example 1: javascript loop through object
Object.entries(obj).forEach(
([key, value]) => console.log(key, value)
);
Example 2: iterate through object array javascript
for (var key in array) {
var obj = myArray[key];
// ...
}