I am trying to use filter in order to match a newly selected name from a select element using ng-options with the names ID.
The object I'm working with looks like:
$scope.fish = {1:'Ben', 2: 'Rich', 3:'John'}
Right now the select is set to "John" by default. When the user changes the select option to lets say "Rich", I want the filter function give me back 2 (which is Rich's corresponding ID).
Assume that:
$scope.selectedFish
only stores the name and not the ID for a fish.