dataType
Type: String
The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
and
api.jquery.com/jquery.getjson$(document).ready(function(){
$.ajax({
type: 'POST',
url: 'ajax.php',
data: page,
// --------------------
dataType: 'json',
// --------------------
beforeSend: alert("Before"),
success: function(respond){
// var obj = JSON.parse(respond);
console.log(respond);
// for (var i in obj.data)
// alert("Key = " + i + " --- VALUE = " + obj.data[i]); /* Перебирает слово Array */
}
});
});