title: How Can I send array tag Id's in Strapi using AND logic not OR logic between them? [MongoDB]
body: <p>I have an array of IDs that are populated in an <code>array</code>.</p>
  <p>I am trying to send an API get request to Strapi with filter as per below:</p>
  <pre><code>  let listTagId = [];
    tagOptions.map((tag) =&gt; {
      if (inputValues[`${tag.nameTag}`]) {
        listTagId.push(tag.id);
      }
    });
  
    let filter = {
      ...cleanObject({
          'tags.id': listTagId.length &gt; 0 ? listTagId : null,
       }
  </code></pre>
  <p>Where <code>cleanObject</code> equals</p>
  <pre><code>function cleanObject(obj) {
    let propNames = Object.getOwnPropertyNames(obj);
    for (let i = 0; i &lt; propNames.length; i++) {
      var propName = propNames[i];
      if (obj[propName] === null || obj[propName] === undefined) {
        delete obj[propName];
      }
    }
    return obj;
  }
  </code></pre>
  <p>The filter then is used later with <code>axios</code> which is calling to Strapi</p>
  <pre><code>  async FIND(filter) {
      try {
        let query
        if (filter) {
          query = qs.stringify(filter)
        }
        let endpoint = `${this.apiEnpoint}${this.service}${query ? `?${query}` : ''}`
        let { data } = await axios.get(endpoint,
          {
            headers: this.headers(this.getToken())
          })
        return { data }
      } catch (error) {
        return { error: this.getErrorMessage(error) }
      }
    }
  </code></pre>
  <p>The Tags are a collection which has a relationship to the <code>API-OBJECT</code>. What I would want to achieve is to filter only those <code>API-OBJECTs</code> which have all of the <code>tags.id</code> included (tag.id1 and tag.id2...).</p>
  <p>At the moment if I use the logic as per above (code) it uses OR logic, meaning it would retrieve back the results from the server if an object has ONE of the tags is in the <code>listTagId</code>.</p>
  <p>Example:</p>
  <ol>
  <li>Sending listTagId =['1223', '345'], currently it retrieves all objects with id's '1223' or '345'. So The object could have a Tag relationship with the 1223 tag only and it would be still retreived. Incorrect behaviour for me.</li>
  <li>Sending listTagId =['1223', '345'], the call should only retrieve the objects having tags with id's '1223' AND '345'.</li>
  </ol>
  <p>Extract from the console:</p>
  <pre><code>'GET /api-end-point/count?_where%5Bcategory_contains%5D=houses&amp;_where%5Btags.id%5D%5B0%5D=60420fc8c4bed44584638dec&amp;_where%5Btags.id%5D%5B1%5D=60420febc4bed44584638ded&amp;_where%5Btags.id%5D%5B2%5D=6042151fbea9601908f2c774&amp;_where%5Btags.id%5D%5B3%5D=60421520bea9601908f2c775&amp;_where%5Btags.id%5D%5B4%5D=60421521bea9601908f2c776&amp;_where%5Btags.id%5D%5B5%5D=60421522bea9601908f2c777&amp;_where%5Btags.id%5D%5B6%5D=60421522bea9601908f2c778 (562 ms)' 
  </code></pre>
  <p>I have tried to use <code>tags.id_in</code>, but this gave the same results as now.</p>
  <p>How should I change the query for the 'tags.id' in order to retrieve the desired elements?</p>