javascript loop through names of keys code example
Example 1: javascript loop through object values
var myObj = {foo: "bar", baz: "baz"};
Object.values(myObj).map((val) => {
console.log(val);
})
// "bar" "baz"
Example 2: loop though json object in javascript
var p = {
"p1": "value1",
"p2": "value2",
"p3": "value3"
};