parse through javascript object code example
Example 1: iterate over object javascript
// Looping through arrays created from Object.keys
const keys = Object.keys(fruits)
for (const key of keys) {
console.log(key)
}
// Results:
// apple
// orange
// pear
Example 2: loop though json object in javascript
var p = {
"p1": "value1",
"p2": "value2",
"p3": "value3"
};