Hello, I have received JSON data in the following format:
{
"communication": [{
"communication_name": "None",
"communication_id": "1"
}],
"hardware": [{
"hardware_name": "XXXXXXXX",
"hardware_id": "6"
}],
"Sofware": [{
"software_name": "XXXXXX",
"software_id": "3"
}, {
"software_name": "XXXXXXXXXXXXX",
"software_id": "4"
}]
}
However, when I try to alert this response using AJAX, it shows as [object Object]. Here is the AJAX code snippet:
if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
var model_result = JSON.parse(xmlHttp.responseText)
alert('' + model_result);
}
I have attempted to use both JSON.parse and eval methods.