I have a JSON like:
var xx = {\'name\':\'alx\',\'age\':12};
Now I can read the value of name which is \'alx\' as xx[0].name, but how shou
You are looking for associative arrays in Javascript. A quick google search suggests the following:
Read this page http://www.quirksmode.org/js/associative.html
and especially this section http://www.quirksmode.org/js/associative.html#link5