title: How to store JSON response into JavaScript
body: <p>I'm trying to store the JSON response in to variable so that I can process it later, i tried with following but getting null,</p>
  
  <pre><code>function go(){
     var jsonObj = getJson(url);
     alert(JSON.stringify(jsonObj));
    }
  
  function getJson(){
      return JSON.parse($.ajax({
          type: 'POST',
          url: 'url',
          dataType: 'json',
          global: false,
          async: false,
          success: function(data){
          return data;
          }
      }).responseText);
  }
  </code></pre>
  
  <p>mean time i can see the JSON content getting printed on my server console.</p>
  
  <p><b>EDIT</b><p>
  Thannks rid..! that fixed the issue. you solution works fine in IE8, but for Chrome and FireFox still getting 'null' in alert pop-up. i don't think its browser specific fix..?</p>