title: How can I access the complex json object value?
body: <p>I have an array object that is below.</p>
  
  <pre><code>var user = [
    {name: 'Corbin', age: 20, location: 'USA'},
    {name: 'prashant', age: 20, location: 'india'}
  ];
  </code></pre>
  
  <p>and I have to capture all the names from the user object i.e.</p>
  
  <pre><code>Corbin
  prashant
  </code></pre>
  
  <p>and I am trying this....</p>
  
  <pre><code>alert(user.name);
  </code></pre>
  
  <p>it gives undefined alert,so please give me proper suggestion for this problem,</p>
  
  <p>thanks, </p>