Attempting to implement this idea for a typeahead feature, I crafted the following code (which functions properly with json data, but not with this new data):
HTML
<input type="text" ng-model="result" typeahead="suggestion for suggestion in instObjs($viewValue)">
JS
function NavbarCtrl ($scope, cService, $http, limitToFilter) {
$scope.institutions = [];
cService.getInstitutions().then(function(institutions){
$scope.institutions = institutions;
});
$scope.instObjs = function(institutions) {
return $scope.institutions.name.then(function(response){
return limitToFilter(response.data, 15);
});
};
};