I'm puzzled about what you want... something like that?
var mydata="init_value";
$.post('http://myurl', {},function(result) {
mydata=result;
alert(mydata);
}, "json");
Whatever you want to be done when the data is available, you should put in the callback.