angularjs - getting only values from json data -
i making http request /result json data . data in format
[{"name":"first","total":830,"passed":678,"failed":152}]}
here's angularjs script-
analyzer.controller('checkvalue',function($scope,$http) { $scope.cases = []; $http.get('/result').success( function(data) { $scope.cases = data.responsedata; }); });
it doesn't work has key , value in data.how can values ?
you can try:
$scope.cases = object.keys(data.responsedata).map(function (key) { return data.responsedata[key]; });
Comments
Post a Comment