I'm somehow confused:
I have a list of commands like this:
var commands = [{"command": "read"}, {"command": "write"}, {"command": "login"}];
If I try it access one of the commands like this it works:
console.log(commands[0]["command"]); // Output is "read"
console.log(commands[0].command); // Output is "read"
But if I try this the output is always undefined:
for(command in commands)
console.log(command["command"]); // undefined, undefined, undefined