[Solved] Add onclick Event to a jQuery.each()


You can parse the json to an object:

var obj = JSON.parse(text);

and then retrieve the values from the object:

obj["1"][0].RequestId

if you want to display them all, you need to iterate through the array and print the values you want:

for (var i = 0; i<output.length; i++) {
    $("#YOURDIV").append("Request id: " + obj[i][0].RequestId);
    $("#YOURDIV").append("Customer id: " + obj[i][0].CustomerId);
    $("#YOURDIV").append("Request Charge : " + obj[i][0].RequestCharge);
}

4

solved Add onclick Event to a jQuery.each()