how to access object and loop in javascript code example
Example 1: javascript loop through object
Object.entries(obj).forEach(
([key, value]) => console.log(key, value)
);
Example 2: javascript loop through object
var person = {"name":"bob", age:45};
for (var property in person) {
console.log(person[property]);
}