title: Angular filter a object by its properties
body: <p>I have an object with a series of object properties that is in the following similar structure (which is the way the data is coming back from a service):</p>
  
  <pre><code>{
    "1": {
      "type": "foo",
      "name": "blah"
    },
    "2": {
      "type": "bar"
    },
    "3": {
      "type": "foo"
    },
    "4": {
      "type": "baz"
    },
    "5": {
      "type": "test"
    }
  }
  </code></pre>
  
  <p>When I do a ng-repeat, I can iterate over all 5 of these object, something like:</p>
  
  <pre><code>&lt;div ng-repeat="item in items"&gt;{{item.type}}&lt;/div&gt;
  </code></pre>
  
  <p>However, <strong>what I really want to do is iterate only over those items that are NOT the type "foo"</strong>, namely 3 iterations instead of 5. I know that filters can somehow be leveraged to do this, but I am not sure how. I tried the following:</p>
  
  <pre><code>&lt;div ng-repeat="item in items| !filter:{type:'foo'}"&gt;{{item.type}}&lt;/div&gt;
  </code></pre>
  
  <p>but this doesn't work. In fact, even doing the following to limit to just 2 objects(those with item.type==="foo"), it doesn't work and does 5 iterations:</p>
  
  <pre><code>&lt;div ng-repeat="item in items| filter:{type:'foo'}"&gt;{{item.type}}&lt;/div&gt;
  </code></pre>
  
  <p>In essence, I want to do something similar to:</p>
  
  <pre><code>&lt;div ng-repeat="item in items" ng-if="item.type !=='foo'&gt;{{item.type}}&lt;/div&gt;
  </code></pre>
  
  <p>However, I know that one doesn't work.</p>