Numbers as keys in JSON object

JSON object: 
var jsonParams = {
                Name: ‘ram’,
                    1: ‘asdf’,
                     2: ‘2312’
}
 
If you want to read value from above JSON object
 
$(“#Name”).val(jsonParams.Name);
$(“#Street”). val(jsonParams[“1”]);
$(“#Pin”).val(jsonParams[“2”]);
Advertisements