title: Checking the value of json data
body: <p>If I have json data which looks like this:</p>
  
  <p><code>{"d":1}</code></p>
  
  <p>How do I check if that <code>1</code> is a <code>1</code> or a <code>0</code>?</p>
  
  <p>I have tried the following, but it goes straight to the <code>else</code>, even when I can see that the json data has a <code>1</code>.</p>
  
  <pre><code>success: function(data) {
  
      if (data[0]) {
          console.log("Results...");
      } else {
          console.log("No results...");
      }
  </code></pre>
  
  <p>the <code>data</code> contains <code>{"d":1}</code></p>