title: How can I get javascript to read from a .json file?
body: <p>My script currently looks like this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    function updateMe(){
      var x = 0;
      var jsonstr = '{"date":"July 4th", "event":"Independence Day"}';
      var activity=JSON.parse(jsonstr);
      while(x&lt;10){
      date = document.getElementById("date"+x).innerHTML = activity.date;
      event = document.getElementById("event"+x).innerHTML = activity.event;
      x++;
      }
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>Where date"x" and event"x" are a series of html tags.  This function runs when the page loads (onload).  My goal is to do this exact same thing, only from a local .json file as opposed to the hard code that I've got above.  I've already checked out <a href="http://api.jquery.com/jQuery.getJSON/">http://api.jquery.com/jQuery.getJSON/</a>.</p>
  
  <p>The local .json file looks like this:</p>
  
  <pre><code>{"date":"July 4th", "event":"Independence Day"}
  </code></pre>
  
  <p>Any suggestions?</p>