How to access object using dynamic key? [duplicate]

You can access objects like arrays:

alert(o[key]);

Leave a Comment