This my JSON file data.
{"434762882136408065":{"hacksilver":1500,"lastDaily":"06/15/2018","username":"Bader56"},"419738969530433548":{"hacksilver":"10009000","lastDaily":"NOT COLLECTED","username":"Robotos"}}
And i want it to log users by richest to not richest like
- ROBOTOS: 10009000
- Bader56: 1500
i tried
Object.keys(userData).forEach(user => {
console.log(userData[user].username+': '+userData[user].hacksilver);
});
but its logging Bader at first place, Also i tried .reverse()
but it the same if there third person here