I am very new to angular JS.My question is, I have a json array that I am getting as ajax response from php page. I am iterating that json array and I want to push each value in the list like
angular.forEach($scope.companies.area, function(value, key) {
$scope.comp = [
{ 'name': value1 },
{ 'name': value2 },
{ 'name': value3 }
//...
]
});
How can I make this list? My Json data is
{"1":"Audugodi","2":"Airforce Station Yelahanka","3":"Agaram","4":"Anadanagar","5":"Arabic College","6" :"Banasawadi","7":"Banashankari","8":"Banashankari II Stage","9":"Banashankari III Stage","10":"Bangalore city","11":"Bangalore GPO","12":"Bannerghatta","13":"Bannerghatta Road","14":"Basavanagudi","15":"Basaveswaranagar" }