Answers for "how to traverse over an object having arrays of objects inside it using javascript"

53

javascript loop through array of objects

var person={
 	first_name:"johnny",
  	last_name: "johnson",
	phone:"703-3424-1111"
};
for (var property in person) {
  	console.log(property,":",person[property]);
}
Posted by: Guest on July-22-2019
4

javascript loop through array of objects

let arr = [object0, object1, object2];

for (let elm of arr) {
  console.log(elm);
}
Posted by: Guest on June-01-2020

Code answers related to "how to traverse over an object having arrays of objects inside it using javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language