I have an array of objects like this:
$scope.SACCodes = [
{'code':'023', 'description':'Spread FTGs', 'group':'footings'},
{'code':'024', 'description':'Mat FTGs', 'group':'footings'}
]
I want to write a function to grab the description based on the code, something like this:
$scope.SACDescription = function(code) {
return $scope.SACCodes WHERE code=:code
}
I'm not sure of the proper syntax?