I'm looping an object with JQuery each and I'm not succeeding.
Object generated below via PHP:
{"status":"hasP",
"flag":null,
"qtProcess":null,
"code": null,
"message": [{"id":"1","email":"[email protected]"},{"id":"2","email":"[email protected]"}]}
JQuery code to catch obejto and generate a table (part where it generates a failure):
$.each(data, function(index, value){
table +='<tr><td>' + value.message.id + '</td>';
table +='<td>' + value.message.email + '</td></tr>';
});
Generate the following error:
TypeError: value.message is undefined