Using window object to update DIV with JSON data
<p>I have a JSON file that I'm trying to pull data from to update a div every 5 seconds.</p>

<p>JSON File:</p>

<p><code>{"playersOnline":0,"version":"1.9.2"}</code></p>

<p>JavaScript:</p>

<pre><code> var checkServerInfo = function(){
        // Get Info From JSON File
        $.getJSON('data.json', function(results) {
            window.playerName = new results[0].serverStatus;
        });             
        // Reload Every 5 Seconds
        setTimeout(checkServerInfo(),5000);
    };
    $(document).ready( checkServerInfo() );
</code></pre>

<p>If I replace the window object with <code>document.write(results.playerName);</code> it writes out the JSON data to the page.</p>