title: Accessing json object inside javascript
body: <p>I want to access the "name" values in Javascript. </p>
  
  <pre><code>$scope.networkIds =[
    {
      "name": "ghdth",
      "value": []
    },
    {
      "name": "dddd",
      "value": []
    },
    {
      "name": "Nrgyr",
      "value": []
    },
    {
      "name": "Ntehyt",
      "value": []
    }
  ];
  </code></pre>
  
  <p>Currently I am using following code:</p>
  
  <pre><code>for(var i=0;i&lt;=$scope.networkIds.length;i++){         
       $log.info(angular.toJson(networkIDsArray[i].name));
    }
  </code></pre>
  
  <p>But I am getting error as </p>
  
  <pre><code>TypeError: Cannot read property 'name' of undefined
  </code></pre>
  
  <p>Kindly help.</p>