title: Angular: custom filter for recursive search in nested object
body: <p>I have some problem with filtering nested object. In select I choose the filter parameter(object value) and in input I type some text that searches it in object key. <br>
  Tried to write custom filter with recursion for deep search but it doesn't work.
  <code>input</code> is parameter for object in ng-repeat, <code>param1</code> is for select's ng-model and <code>param2</code> is for input's ng-model.</p>
  
  <p><br>
  <strong>JS</strong></p>
  
  <pre><code>  .filter('personFilter', function($filter) {
      return function(input, param1, param2) {
        var output = {};
        for (var prop in input) {
            if (typeof input[prop] == 'object' || prop != param1 &amp;&amp; input[prop] != param2) {
                $filter('personFilter')(input[prop]);
            } else {
                output[key] = input[key];
            }
        }
        return output;
      }
  </code></pre>
  
  <p><br>
  Here's the plunker: <a href="http://plnkr.co/edit/83lPNRWFy6wa9U2FkMfH?p=preview" rel="nofollow">http://plnkr.co/edit/83lPNRWFy6wa9U2FkMfH?p=preview</a> <br>
  I hope someone give me some advice</p>