After I use the getJSON method I want to update the variable, but it doesnt seem to update from inside the .done() function. The following console log is empty.
var myVar;
$.getJSON("url/path", function(data){
}).done(function(data) { 
          myVar = data; 
      });
console.log(myVar);
 
     
    