js traverse object code example
Example 1: object iterate in javascript
for (let key in yourobject) {
console.log(key, yourobject[key]);
}
Example 2: iterate over object javascript
// For a functional one-liner
Object.keys(pokemons).forEach(console.log);
// Bulbasaur
// Charmander
// Squirtle
// Pikachu