how to loop trough an object code example
Example 1: javascript loop through object
Object.entries(obj).forEach(
([key, value]) => console.log(key, value)
);
Example 2: javascript looping through object
for (var property in object) {
if (object.hasOwnProperty(property)) {
// Do things here
}
}