title: Filter array of objects by array of objects [TypeScript] [ES6]
body: <p>How to filter array of objects by array of objects with conditions.</p>
  
  <p>Interfaces:</p>
  
  <pre><code>interface Person {
      age: number;
      available: boolean;
  }
  
  interface PersonFilter {
      predicateFn(arg: Person): boolean;
  }
  </code></pre>
  
  <p>Data: </p>
  
  <pre><code>const persons = [
    {
      "age": 2,
      "available": false
    },
    {
      "age": 5,
      "available": true
    }
  ];
  </code></pre>
  
  <p>Conditions to filter:</p>
  
  <pre><code>const filters = [
      {predicateFn: person =&gt; person.available},
      {predicateFn: people =&gt; person.age &gt; 2}
  ];
  </code></pre>
  
  <p>How to filter this array of objects using current filters structure ?</p>
  
  <pre><code>function getFilteredPersons(filters): Person[]{
  return persons.filter( ?? );
  }    
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>  [
        {
          "age": 5,
          "available": true
        }
      ]
  </code></pre>