title: $.grep to return property after match
body: <p>I couldn't find any instances where this was being done so I'm asking you brainy people out there if there's a nice easy way to do what I'm wanting.</p>
  
  <p>Trying to map two arrays together. One array has a list of the IDs (Foos), and the other array has all the properties (bars) for those IDs. Want to keep everything in my angular controller.</p>
  
  <p>Here's a snippet. I'm trying to match on ID and map into the Name property. </p>
  
  <pre><code>$scope.Foos = $.map($scope.Foos, function (foo) {
                              return {
                                  ID: foo.ID,
                                  Name: $.grep($scope.bars, function(b){
                                      return b.ID === foo.ID;
                                  }).Name,
                                  Property: $.grep($scope.bars, function(b){
                                      return b.ID === foo.ID;
                                  }).Property
                                  };
                              });
  </code></pre>
  
  <p>What I understand is that $.grep will return the object based on the criteria, can I then call properties of that returned object?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Foos is ID (guid)
  Bars is ID(guid), Name &amp; Property</p>