$.getJSON to make its result global
<p>I'm using the jQuery function <code>$.getJSON</code> to get some data from the server side and here is the code:  </p>

<pre><code>function (){
  $.getJSON("someURI",function(result){
    //this alert works fine
    alert(result.msg) 
  });

  // this prints the data as undefined
  alert(result.msg); 
}
</code></pre>

<p>how to change the scope of "result" returned from <code>$.getJSON</code> in order to make it global.. to make the second alert prints its value not to be undefined ??</p>
