title: how to get array element in javaScript
body: <p>I have a problem with JavaScript,
  I have an array that get from model in controller and send it from controller to view like : echo json_encode($data);
  when i printed console.log(data) in view I got data like :</p>
  
  <pre><code>[{"id":"1","u_name":"07991111111"}]
  </code></pre>
  
  <p>Now I want to get the specific data like user_name.
  how can i get ?</p>
  
  <p>I tried </p>
  
  <pre><code>console.log(data.user_name)
  </code></pre>