title: Grab specific value from Array of Objects based on value of object
body: <p>I have an array of objects like this:</p>
  
  <pre><code>$scope.SACCodes = [
      {'code':'023', 'description':'Spread FTGs', 'group':'footings'},
      {'code':'024', 'description':'Mat FTGs', 'group':'footings'}
  ]
  </code></pre>
  
  <p>I want to write a function to grab the description based on the code, something like this:</p>
  
  <pre><code>$scope.SACDescription = function(code) {
       return $scope.SACCodes WHERE code=:code
  }
  </code></pre>
  
  <p>I'm not sure of the proper syntax?</p>