Value array json: How to get elements with Angular js?
angularjs, json
Solution
What you get starts with `[`, so it's an array. So you need `data[0]`.
The first element of this array (`data[0]`) is an object (it starts with `{`) which has a RESULT attribute. So you can use `data[0].RESULT`.
The value of the RESULT attribute is another object which has a `ROWS` attribute (Note the final `S`). So you can use `data[0].RESULT.ROWS`.
The value of ROWS is an array, containing another array, so you need `data[0].RESULT.ROWS[0][1]`.
Problem
The call on the api returns this json: ``` [ { "RESULT": { "TYPES": [ "bigint", "varchar", "varchar", "varchar", "varchar", "varchar", "date", "varchar", "int", "int", "varchar" ], "HEADER": [ "kvk", "bedrijfsnaam", "adres", "postcode", "plaats", "type", "anbi", "status", "kvks", "sub", "website" ], "ROWS": [ [ "273121520000", "Kinkrsoftware", <-- this is the value i want "Oude Trambaan 7", "2265CA", "Leidschendam", "Hoofdvestiging", null, null, "27312152", "0", null ] ] } } ] ``` I can't change the api code. I am using Angular and I can't see to get access to the values. This is my controller: ``` .controller('MainCtrl', function($scope, $http, $log, kvkInfo) { kvkInfo.success(function(status, data) { $scope.name = status; $scope.bedrijf = data; $scope.status = status; }); }); ``` I have tried data.RESULT.ROW, data.RESULT.ROW[1], data.RESULT[0].ROW, data.RESULT[0].ROW[1], data.ROW[1] How can i get this element?