javascript for each key in object
snippet in javascript

javascript for each key in object

user4804

var person={
 	first_name:"johnny",
  	last_name: "johnson",
	phone:"703-3424-1111"
};
for (var property in person) {
  	console.log(property,":",person[property]);
}

iterate over object javascript

user9124

// For a functional one-liner
Object.keys(pokemons).forEach(console.log);
// Bulbasaur
// Charmander
// Squirtle
// Pikachu