title: Unexpected Outcome When Parsing JSON with jQuery
body: <p>Fiddle: <a href="http://jsfiddle.net/wy4wd/19/" rel="nofollow">http://jsfiddle.net/wy4wd/19/</a></p>
  
  <p>I am parsing a json object but it's falling through to the else which results in the html being <code>Error</code> when it should be <code>ID not found</code> and I can't figure out why.</p>
  
  <p>It works fine if <code>success</code> is <code>1</code>.</p>
  
  <p>The JSON is returned by a post request but for question purposes I am declaring it locally.</p>
  
  <pre><code>$(document).ready(function() {
      var data = '{"success": "0","patient_cid": "0"}';
      var response = jQuery.parseJSON(data);
  
      if (response.success == 0) {
          if (response.patient_cid == 0) {            
              $('#resultpanel').html('&lt;p&gt;ID not found&lt;/p&gt;');
          }
          if (response.patient_ambassador == 0) {                 
              $('#resultpanel').html('&lt;p&gt;ID found but not an ambassador&lt;/p&gt;');
          }               
          if (response.soap_error == '1') {                   
              $('#resultpanel').html('&lt;p&gt;SOAP error&lt;/p&gt;').fadeIn('slow');
          }                   
      }
      if (response.success == 1){
          $('#resultpanel').html('&lt;p&gt;success&lt;/p&gt;').fadeIn('slow');
      }   
      else {              
          $('#resultpanel').html('&lt;p&gt;Error&lt;/p&gt;').fadeIn('slow');
      }   
  });
  </code></pre>