I am getting undefined when the result is returned, can anyone help me out here? I know there's a similar question out there but i couldn't understand the solution. Thus, asking again.
JS:
$scope.cnames = CombinedName;
console.log($scope.cnames)
Console log view :
Lastly, my html code :
<input type="text" ng-model="selected" uib-typeahead="NAME
for cname in cnames | filter:$viewValue | limitTo:8">
View im getting :


NAMEproperty on eachcname, because eachcnameis a string. Try something likecname for cname in cnamesinstead.cnamesis an array of strings,selectedwill be the index of the element in the array, rather than the text itself. if you want the text, thencname as cname for cname in cnameswould probably work.