Is there any alternative code of jquery ajax async false ?
I should code like below:
func1(){
var result = false;
$.getJSON("URL", function(data){
result = data;
});
return result;
}
How about adding done() method after $.getJSON()? then the code flows as func1() -> getJSON() -> done() -> func1() -> return ?
Any suggestion?