title: Dynamically filtering an array of objects with n filter criteria
body: <p>I have an array of objects (data), and I need to filter this array based on filter criteria (criteria) where each criteria can have multiple values. </p>
  
  <pre><code>var data = [
    { ID: 1, Name: "John", Color: "Blue", Location: "Up" },
    { ID: 2, Name: "Pauline", Color: "Green", Location: "Up" },
    { ID: 3, Name: "Ahmed", Color: "Orange", Location: "Left" },
    { ID: 4, Name: "Diego", Color: "Pink", Location: "Up" },
    { ID: 5, Name: "Maria", Color: "Black", Location: "Down" },
    { ID: 6, Name: "Gus", Color: "Green", Location: "Up" },
    { ID: 7, Name: "Brian", Color: "Pink", Location: "Left" },
    { ID: 8, Name: "Shelley", Color: "Green", Location: "Right" },
    { ID: 9, Name: "Leonardo", Color: "Blue", Location: "Right" },
    { ID: 10, Name: "Big Daddy", Color: "Green", Location: "Down" }
  ];
  
  var criteria = [
     { Field: "Color", Values: ["Green"] },
     { Field: "Location", Values: ["Up", "Down"] }
  ];
  </code></pre>
  
  <p>I need an array of object (filtered) in such a way that
  1. each filter criteria is treated as "AND"
  2. multiple filter values in a filter field are treated as "OR". So this is how the output should be:</p>
  
  <pre><code>var filtered = [
        { ID: 2, Name: "Pauline", Color: "Green", Location: "Up" },
        { ID: 6, Name: "Gus", Color: "Green", Location: "Up" },  
        { ID: 10, Name: "Big Daddy", Color: "Green", Location: "Down" }  
      ];
  </code></pre>