var clients = [];
var tmp = [];
tmp["username"] = rows[0].username;
tmp["rank"] = rows[0].rank;
tmp["lastaction"] = "0";
tmp["connection"] = connection;
clients.push(tmp);
JSON.stringify(clients)
I initialized an array (clients) and pushed an associative array (tmp) to the clients array. But if I "stringify" the client, it will just return "[[]]".
What did I wrong?
Thank you in advance.