title: Parsing Json Array In Ajax Response
body: <p>I am working with an application that makes an ajax call and gets a json response. The response is shown below:</p>
  
  <pre><code>    "msg":"successful.","data":{"fee":"100","balance":{"0":"12180"},"status":{"0":"0"}}
  </code></pre>
  
  <p>The code application logic tests for the value of the "status" field and checks if it is zero before populating a textbox with the response.</p>
  
  <p>The issue is that the "status" field is not being accessed correctly..(i believe) therefore the condition to display the response is never true.</p>
  
  <p>The code is :</p>
  
  <pre><code>   if(data_array.data.status == 0) {/// do stuff
  </code></pre>
  
  <p>I am of the opinion that this method of accessing the status field is wrong..</p>
  
  <p>I tried this  </p>
  
  <pre><code>   if(data_array.data.status.0 == 0) {///
  </code></pre>
  
  <p>but i am getting an error....
  should i try..</p>
  
  <pre><code>    data_array.data.status[0]==0...
  </code></pre>
  
  <p>How can i access the "status" field value?</p>
  
  <p>Thanks</p>