title: What's wrong with my data, received through JQuery AJAX request?
body: <p>I'm making an API call with this code:</p>
  
  <pre><code>$.ajax({
      type: "GET",
      url: "https://example/example.json",
      beforeSend: function(xhr) {
          xhr.setRequestHeader("apikey", "user")
      },
      success: function(data){
          alert(data.folder.item);
      }
  })
  </code></pre>
  
  <p>That returns nothing, except for an error in the console saying: </p>
  
  <blockquote>
    <p>"Uncaught TypeError: Cannot read property 'item' of undefined"</p>
  </blockquote>
  
  <p>The JSON data looks like this when I use the url in the browser:</p>
  
  <pre><code>{
      "folder": {
           "item": 123123,
           "item 2": false,
           "item 3": "content",
           "item 4": [
               {
                 "subitem": "content"
               },
               {
                  "subitem": "content2"
               }
           ]
      }
  }
  </code></pre>
  
  <p>I was expecting "123123" in the alertbox, but nope. So what am I doing wrong?</p>