I have a json array from a json response of this nature
data {"success":true,"errorCode":0,"data":["kkkk-kkkk 1","oooo-ooooo 2"]}
- Item 1 is expected to be >>>
kkkk-kkkk 1 - Item 2 is expected to be >>>
oooo-ooooo 2
in angular script controller I am doing this to push the array into the html view
else if (res.status == 200) {
$scope.partners = [];
var myJSON = res.data;
console.log("data" + JSON.stringify(res.data));
angular.forEach(myJSON, function (item) {
$scope.activities.push(item);
I want to get the json arrays to fill a dropdown of this is a challenge
<select ng-model="act" formcontrol class="ui fluid dropdown ng-untouched ng-pristine ng-valid" required>
<option ng-repeat="a in activities" value="{{a}}">{{a}}</option>
</select>
Please assist
res.data.datadirectly to$scope.activities?