title: How to filter Subscribers based on array of tags in Loopabck
body: <p>I've two models - <strong>subscribers</strong> and <strong>tags</strong></p>
  
  <p>Sample data: </p>
  
  <pre><code>{
   subscribers: [
    {
     name: "User 1",
     tags: ["a","b"] 
    },
    {
     name: "User 2",
     tags: ["c","d"] 
    }
   ]
  }
  </code></pre>
  
  <p>I want to filter subscribers based on their tags. </p>
  
  <ul>
  <li>If I give <code>a</code> and <code>b</code> tags, User 1 should list </li>
  <li>If I give <code>a</code> and <code>c</code> tags, 
  both User 1 and User 2 should list</li>
  </ul>
  
  <p>Here is what I tried:</p>
  
  <p><strong>Method 1:</strong></p>
  
  <p><code>tags</code> is a column in <code>subscribers</code> model with array data type</p>
  
  <pre><code>/subscribers/?filter={"where":{"tags":{"inq":["a","b"]}}} // doesn't work
  </code></pre>
  
  <p><strong>Method 2:</strong></p>
  
  <p>Created a separate table <code>tags</code> and set <code>subscribers</code> has many <code>tags</code>.</p>
  
  <pre><code>/subscribers/?filter={"where":{"tags":{"inq":["a","b"]}}} // doesn't work
  </code></pre>
  
  <p>How can I achieve this in Loopback without writing custom methods?</p>
  
  <p>I've <strong>Postgresql</strong> as the connector</p>