I have an object that looks like this. Basically what I need is to loop through the filterNameList array and pull out the first value in each of the objects that belong to the filterNameList, it will always be the [0] value. Having some trouble getting these extracted out to display on the page.
acceptableFlag: "True"
filterNameList: Array[5]
0: Array[2]
0: "Asia"
1: 20000
1: Array[2]
0: "China"
1: 20001
2: Array[2]
0: "Beijing"
1: 50000
reportId: 48
reportName: "Multiple"
Would the following function work?
function filterLabel(data){
angular.forEach(data, function(obj, i){
angular.forEach(obj, function(filterNameList, i){
if (filterNameList.filterNameList == 20000){
filterNameList.filterLabel = "Region"
}
})
})
};
data.filterNameList.forEach(function(nameList, i) {})