iterate object js

JavaScript
for (let item of items) {
    console.log(item); // Will display contents of the object inside the array
}for (let key in yourobject) {
   if (yourobject.hasOwnProperty(key)) {
      console.log(key, yourobject[key]);
   }
}var obj = {
  first: "John",
  last: "Doe"
};

//
//	Visit non-inherited enumerable keys
//
Object.keys(obj).forEach(function(key) {

  console.log(key, obj[key]);

});Object.entries(obj).forEach(([key, value]) => {
	console.log(key, value);
});
Source

Also in JavaScript: