If you wish to make an ajax call, and assign response json into a variable directly...here is a small hack :
function getJson(url) {
return JSON.parse($.ajax({
type: 'GET',
url: url,
dataType: 'json',
global: false,
async:false,
success: function(data) {
return data;
}
}).responseText);
}
var myJsonObj = getJson('myjsonurl');