title: Why isn't my json data displaying with JsonView?
body: <p>I'm trying to display this code with JSONView but won't display when calling the data from inside the api callback function, but will display non api data when placed outside the callback.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// Call FreeGeoIP API to get browser IP address
  $.getJSON('https://freegeoip.net/json/', function(data) {
    var ipaddress = data.ip;
  
    // Get browser language
    var language = window.navigator.language;
  
    // Get software
    var software = window.navigator.appVersion;
    var regExp = /\(([^)]+)\)/;
    software = regExp.exec(software)[1];
  
    // Add data to obj
    var obj = {
      'ipaddress': ipaddress,
      'language': language,
      'software': software
    };
  
    // Write obj to document
    $('body').html(JSON.stringify(obj));
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>