can convert a string into a property? I'm not very good with javascript objects, so I'd like your help ...
This is jsfiddle: http://jsfiddle.net/972fqz39/
var person = {
lastName : "Doe"
};
var stringa= "lastName";
alert(person.stringa);
in this case it return undefined
, i know that maybe i can to use person.lastName
, but in my big code i can't use it.
So is possible to convert stringa
in a property ??
Thanks!