title: AngularJS filter for nested objects
body: <p>I have an array of objects with arrays of objects in it:</p>
  
  <pre><code>var content = [
    { 
      name: 'Foo',
      sub: [{ name: 'Bar' }, { name: 'Foobar' }] 
    },
    ...
  ]
  </code></pre>
  
  <p>and a template:</p>
  
  <pre><code>&lt;input ng-model="search" /&gt;
  
  &lt;div ng-repeat="item in content | filter:search&gt;
     {{item.name}}
     &lt;div ng-repeat="key in item"&gt;
        {{key.name}}
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now, I use the <code>filter</code> filter to search for string matches, but it applies only to the first <code>ng-repeat</code> directive. How could I include the second directive into the search filter? Thanks in advance.</p>