var user = {};
now I want to create a setUsers() method that takes a key/value pair object and initializes the user variable.
setUsers = function(data) {
// loop and init user
}
where data is like:
234: "john", 23421: "smith", ....
{{},..}. When would I use this one instead of an array of objects[{},..]? ok, here is the answer, welcome to SO;).