title: How to read a local JSON file
body: <p>I am following a tutorial on YouTube but I couldn't make it run. Basically I have a <code>country.json</code> file.and I am trying to retrieve data inside it. What is wrong here??</p>
  
  <p>This is how <code>country.json</code> file looks like</p>
  
  <pre><code>{
    "name": "Germany",
    "capital": "Berlin",
    "pop": "some value"
  }
  </code></pre>
  
  <p>JavaScript</p>
  
  <pre><code>var container = $("div.container");
  $("input#get").click(function () {
    $.ajax({
      type: "Get",
      url: "country.json",
      dataType: "json",
      successs: function (data) {
        $.each(data, function (index, item) {
          $.each(item, function (key, value) {
            container.append(key + " : " + value + "&lt;/br&gt;");
          });
          container.appendChild("&lt;br/&gt;&lt;br&gt;")
        });
      }
    });
  });
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;div class="container"&gt;&lt;/div&gt;
  &lt;div id="form-area"&gt;
    &lt;h2&gt;Get&lt;/h2&gt;
    &lt;input type="submit" id="get" value="get"&gt;
  &lt;/div&gt;
  </code></pre>