title: Algolia filter by nested attribute JavaScript
body: <p>So I am using Algolia.com to index users for quick searching.</p>
  
  <p>An example object in index:</p>
  
  <pre><code>{
      id: 1,
      username: "john.doe",
      name: "John Doe",
      attributes: {
          gender: "male",
          hair_color: "blonde",
          eye_color: "blue",
          height: 165
      }
  }
  </code></pre>
  
  <p>I'd like to filter results by a specific attribute (object key) in the attributes object.</p>
  
  <p>I thought maybe using <code>facetFilters</code> would do the job, but I am unable to get it working.</p>
  
  <p>I have tried many variances of this code:</p>
  
  <pre><code>user_index.search('', {
      facets: '*',
      facetFilters: ['attributes.hair_color:blonde', 'attributes.eye_color:blue']
  }, function(error, data) {
      console.log(error, data);
  });
  </code></pre>
  
  <p>-- / --</p>
  
  <pre><code>user_index.search('', {
      facets: '*',
      facetFilters: ['hair_color:blonde']
  }, function(error, data) {
      console.log(error, data);
  });
  </code></pre>
  
  <p>Please find the documentation here: <a href="https://www.algolia.com/doc/javascript" rel="nofollow">https://www.algolia.com/doc/javascript</a></p>