I get the following string:
[{"Key":1,"Value":"correct"},{"Key":2,"Value":"incorrect"},{"Key":3,"Value":"incorrect"},{"Key":4,"Value":"correct"},{"Key":5,"Value":"incorrect"}]
I want to change the background color of my TR based on whether the ID of that TR has a value of "correct" or "incorrect" in the JSON.
How can I get the value of an individual item from JSON? I have tried:
success: function (result) {
// update with results
//alert(JSON.stringify(result));
//$('#myDiv').html(JSON.stringify(result));
// non of these work
alert(result[0]);
alert(result[key]);
},