Good evening guys,
I have the following requisition AJAX:
function getJson(url) {
var json;
$.ajax({
type: "POST",
url: url,
dataType: "json",
async: false,
success: function (data)
{
alert(data);
json= data;
}
});
return json;
}
When a execute, it shows a json on Chrome's network tab. But i can't manipulate using the variable data neither in an alert nor on return. There is something wrong with the code?