title: Get Json From php file
body: <p>I am new to jQuery. I have got an error when I try to get data from <code>fileresult.php</code>.</p>
  
  <p><strong>fileresult.php</strong></p>
  
  <pre><code>$return_arr = array();
  $row_array['status'] = 'Ok';
  $row_array['message'] = 'good'
  array_push($return_arr, $row_array);
  echo json_encode($return_arr);
  </code></pre>
  
  <p><strong>JSON output</strong></p>
  
  <pre><code>[{"date":"2014-03-15","status":"ok","message":"good"}]
  </code></pre>
  
  <p><strong>get_result.js</strong></p>
  
  <pre><code>$.post('file.php', $("form").serialize(), function(data) {
      var status = data['status'];
      alert(status);  
  });
  </code></pre>
  
  <p>When I alert data, it shows <code>undefined</code>. Somebody please help me. How can I show the correct data.</p>