How do I dynamically access json values?

var myJSONObject = {"formValues": [
        {'name': 'Frank'},
        {'city': 'London'},
                {'age': 25}
                ]
};

The following gives me undefined.


$.each(myJSONObject.formVals, function(i,item){

        alert('i = ' + i + '   item0 = ' + item[0] + '   item1 = ' + item
[1]);
});

Reply via email to