Answers for "how to loop over all the objects inside an array"

4

javascript loop through array of objects

var people=[
  {first_name:"john",last_name:"doe"},
  {first_name:"mary",last_name:"beth"}
];
for (let i = 0; i < people.length; i++) { 
  console.log(people[i].first_name);
}
Posted by: Guest on June-17-2019

Code answers related to "how to loop over all the objects inside an array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language