title: Filtering on object map rather than array in AngularJS
body: <p>Given a controller with a $scope property that is an object with other properties rather than an array like below, how should I filter the <code>ng-repeat</code> set? </p>
  
  <p>Here is a JSFiddle: <a href="http://jsfiddle.net/ZfGx4/110/" rel="noreferrer">http://jsfiddle.net/ZfGx4/110/</a></p>
  
  <p>Controller:</p>
  
  <pre><code>function HelloCntl($scope, $filter) {
      $scope.friends = {
          john: {
              name: 'John',
              phone: '555-1276'
          },
          mary: {
              name: 'Mary',
              phone: '800-BIG-MARY'
          },
          mike: {
              name: 'Mike',
              phone: '555-4321'
          },
          adam: {
              name: 'Adam',
              phone: '555-5678'
          },
          julie: {
              name: 'Julie',
              phone: '555-8765'
          }
      };
  }​
  </code></pre>
  
  <p>Template:</p>
  
  <pre><code>&lt;div ng:app&gt;
   &lt;div ng-controller="HelloCntl"&gt;
    &lt;input placeholder="Type to filter" ng-model="query"&gt;     
    &lt;ul&gt;
     &lt;li ng-repeat="(id, friend) in friends | filter:query"&gt;
      &lt;span&gt;{{friend.name}} @ {{friend.phone}}&lt;/span&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>