title: Loading data from external json file with javascript or jquery
body: <p>I'm looking into dynamically using data from an external json file into my javascript.
  I must have misunderstood how to call the file because for the moment I can't even access the data...
  So theres my html calling the js file. and the js file calls the json using this method :  </p>
  
  <pre><code>$(function() {
      function stockTimeline(){
          $.getJSON('json/corse_timeline/corse_timeline.json', function(donnees) {
              $('#wrap').html('&lt;p&gt;' + donnees.timeline.date[4].endDate + '&lt;/p&gt;&lt;p&gt;' + donnees.timeline.date[9].startDate + '&lt;/p&gt;&lt;p&gt;' + donnees.timeline.headline + '&lt;/p&gt;&lt;p&gt;' + donnees.timeline.date[30].headline + '&lt;/p&gt;&lt;p&gt;');
              console.log("this console.log IS NOT working");
          });
          console.log("this console.log IS working");
      }
      stockTimeline(); 
  });
  </code></pre>
  
  <p>I've taken this method right out of several tutorials I've read.
  How can I test if my json file is corrupted?
  Is it because I need to upload it on a server for it to work?</p>