how to access object property using variable [duplicate]

Square brackets:

message = Messages[ attribute ];

Leave a Comment