So i'm trying to get all data from JSON variable and console.log them So basically what i have tried:
var users = {
"kyle": {
age: 16
}
}
users.forEach(user => {
console.log(user);
});
And it throw an error:
users.forEach is not a function
So any ideas?
usersisn't an array (nor is it something else with aforEachproperty)JSON.parse.JSON.parse(users).forEach(user => { console.log(user); });