I have dynamically generated array
var userData = new Array();
var userHash = "HashCode123";
// now I push object to that array:
userData[userHash].username = "Ferdo";
userData[userHash].ban = 0;
Console returning this values:
userData
[] //why this is not array of object(s)?
userData[hash]
Object {username: "Ferdo", ban: 0}
I need run userData.forEach()
but I can't because array is empty? Thank you for help.