How to data specific data from json file in angularjs -


i'm new angularjs , i'm trying retrieve json data json file. i'm unable it.

this approach in controller:

.controller('firstctrl', ['$scope', '$http', function ($scope, $http) {     $http.get('https://feeds.citibikenyc.com/stations/stations.json').         success(function (data, status, headers, config) {            $scope.data = data;            alert(data);     }).         error(function (data, status, headers, config) {             // called asynchronously if error occurs             // or server returns response error status.     }); }]); 

i want save specific values scope. how can this? in alert shows: [object object].

how can access each value inside json file?

thanks.

for(var item in data.stationbeanlist){    alert(item.id); } 

will ids of list or can push array way

var ids = []; for(var item in data.stationbeanlist){    ids.push(item.id); } 

regards.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -