http://plnkr.co/edit/l63zgdyDeZnvNGVAar6P?p=preview
You need to use just filter the first array with .filter
method on the array, and check to see if the type is equal to the other type in a function (like get(option2)
)
<select id="unitTypes_speciality" name="speciality" data-role="none" data-ng-model="speciality"
ng-options="p as p.label group by p.type for p in get(options2, type)"><option>None</option></select>
$scope.get = function(myarray, type) {
return myarray.filter(function(value) { return value.type == $scope.type.label })
}