javascript dot notation to bracket notation in array of objects -
i have array of objects , i'm looking use google closure. need convert dot notation bracket notation.
at moment, i'm accessing properties in loop this:
thearray[i].myprop1; thearray[i].myprop2;
when write
thearray[i].['myprop1'];
it doesn't convert. how do conversion bracket notation in arrays of objects.
drop dot.
it should thearray[i]['myprop1'];
Comments
Post a Comment