Iterate JSON Object

PHOTO EMBED

Wed Apr 07 2021 03:30:04 GMT+0000 (UTC)

Saved by @Tephlon #javascript

var object1; //JSON object

for (const [key, value] of Object.entries(object1)) {
  console.log(`${key}: ${value}`);
}
content_copyCOPY

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries