Hello,
I have some JSON that looks like the following:
[{"Age":35,"FirstName":"Peyton","LastName":"Manning"},
{"Age":31,"FirstName":"Drew","LastName":"Brees"},
{"Age":58,"FirstName":"Brett","LastName":"Favre"}]
This JSON is passed into a function I have created called parseJSON. This function looks like this:
function parseJSON(result)
{
$.each(result.items,function(i,item) {
alert("First Name: " + item.FirstName);
alert("Age: " + item.Age);
});
}
When I run this code though, I get a JavaScript error that says "G is undefined". How do I parse my JSON with JQuery such that I can read the FirstName and Age properties?
Thank you!