I have an array of objects. Each object has multiple properties such as 'activityType'. I'm trying to assign that object to $scope.selectedActivity based on the $scope.activityType value that is already assigned. I've tried to use $filter but I'm not sure how to code the expression properly.
This is my code:
$scope.selectedActivity = $filter('filter')($scope.activityTypes, $scope.activityTypes.activityType == $scope.activityType);