Answers for "getJSON how to set async to false"

0

getJSON how to set async to false

$.ajaxSetup({
    async: false
});
var jsonData= (function() {
    var result;
    $.getJSON('data.txt', {}, function(data){
      result = data;
    });
    return result;
})();
alert(JSON.stringify(jsonData));
Posted by: Guest on October-13-2021

Code answers related to "getJSON how to set async to false"

Code answers related to "Javascript"

Browse Popular Code Answers by Language