I have a standard AJAX request:
$.ajax({
type: "POST",
contentType: "application/json;",
...,
success: function(data){
// Wanna loop the resultList here...
}
});
...which returns a JSON object which looks like this:
{
"notification": "Search complete",
"resultList": [
{
"id": 1,
"comment": "lorem"
},
{
"id": 2,
"comment": "ipsim"
},
{
"id": 3,
"comment": "dolor"
}
]
}
How do I loop though this with jQuery so that the following is printed in the log:
ID #1 - lorem
ID #2 - ipsum
ID #3 - dolor
Sorry for posting another one of these but I can't figure out how to print this without including the notification. Hopefully this will help others as well..