title: Lodash: filter a nested object by multiple properties
body: <p>Consider the following example:</p>
  
  <pre><code>var products = {
      "Products": [{
          "Title": "A",
          "Categories": [{
              "Name": "Type",
              "Properties": ["Type 1", "Type 2", "Type 3"]
          }, {
              "Name": "Market",
              "Properties": ["Market 1", "Market 2", "Market 3", "Market 4"]
          }, {
              "Name": "Technology",
              "Properties": ["Tech 1", "Tech 2"]
          }]
      }, {
          "Title": "B",
          "Categories": [{
              "Name": "Type",
              "Properties": ["Type 1", "Type 3"]
          }, {
              "Name": "Market",
              "Properties": "Market 1"
          }, {
              "Name": "Technology",
              "Properties": ["Tech 1", "Tech 3"]
          }]
      }, {
          "Title": "C",
          "Categories": [{
              "Name": "Type",
              "Properties": ["Type 1", "Type 2", "Type 3"]
          }, {
              "Name": "Market",
              "Properties": ["Market 2", "Market 3"]
          }, {
              "Name": "Technology",
              "Properties": ["Tech 2", "Tech 3"]
          }]
      }]
  }
  </code></pre>
  
  <p>I'm trying to filter products by their properties so consider I'm using an array to keep track of my selected filters:</p>
  
  <pre><code>var filters = ['Type 3', 'Tech 1'];
  </code></pre>
  
  <p>With these filters I would like to return product A and product B.</p>
  
  <p>I currently have this:</p>
  
  <pre><code>var flattenedArray = _.chain(products).map('Categories').flatten().value();
  var result= _.some(flattenedArray , ['Properties', 'Tech 1']);
  </code></pre>
  
  <p>But I'm stuck on how to combine the properties for a combined search.</p>