Parsing PHP Json Object using jQuery.
FORMAT LIKE
const arr ="{\"asc_report\":{\"ascendant\":\" axa\",\"report\":\" dfkhgdfkjghfdjkghjfg\"}}";
OR
{"rcaaf_report":{"type":"rcaaf"," report":"rcaaf employee"}};
$.ajax(
{
type: "POST",
url: "ascendant.php",
data: form_data,
dataType: "json",
success: function(result){
const arr =result;
const myJSON = JSON.stringify(arr.asc_report.ascendant);
alertify.alert(myJSON);
}
});
Post a Comment
0Comments