This is my my code which calls AJAX function:
$result = ajax_submitter("POST", "/documents/merge_documents", {doc_id_list: $doc_id_array});
function ajax_submitter($type, $url, $data_submit)
{
$result = $.ajax({
url: $url,
type: $type,
data: $data_submit,
dataType: "JSON",
cache: false,
timeout: 0,
error: function (jqXHR, textStatus, errorThrown) {
console.log("Error:\n" + errorThrown + '\n' + textStatus);
},
success: function (return_data, status) {
}
});
return $result;
}
This AJAX function calls a PHP method which returns this:
echo json_encode(array('text' => 'This function is not implemented yet'));
And this is what I see in Chrome's console:
NOW my question is how do I access 'responseJSON' or 'responseText', and is this output a JSON object, if not then what type of object is it?