for in loop javascript for object values 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 in object javascript
var person = {"name":"Rasel", age:26};
for (var property in person) {
console.log(person[property]);
}