title: How to do conditionally filtering with Directus Javascript SDK?
body: <h3>Problem</h3>
  <p>I am not able to change the default <code>AND</code> operator in the <code>curl</code> call like explained in the <em>directus api docs</em>:</p>
  <p><a href="https://docs.directus.io/api/reference.html#filtering" rel="nofollow noreferrer">https://docs.directus.io/api/reference.html#filtering</a></p>
  <h3>Question</h3>
  <p>How can I enable the <code>OR</code> operator in order to filter based on different criteria like the code below?</p>
  <h3>Code</h3>
  <pre><code>return client
        .getItems('privileges', {
          fields: ['*', 'image.filename', 'image.data.full_url', 'attachment.*', 'partner.*.*', 'location.*', 'category.*.*', 'type.icon.data.full_url'],
          meta: ['total_count', 'result_count'],
          sort: 'created_on',
  
      filter: {
        'location.city': {
          'contains': lowerQ
        },
        // 'location.title': {
        //   'contains': lowerQ
        // },
        category: {
          'eq': category,
        },
        available_from: {
          'lte': 'now'
        },
        available_until: {
          'gte': 'now'
        },
      },
      limit,
      offset,
    }).then(response =&gt; {
      dispatch(getPrivilegesSuccess(key, response))
    }).catch(error =&gt; {
      console.log(error);
      dispatch(getPrivilegesFail(key, error))
    });
  </code></pre>
  <blockquote>
  <p>So, the comments out code is a different criteria that should be able to match on inserted text using the <em>or</em> operator. Instead it is using the <em>AND</em> operator in the curl output api call at the moment.</p>
  </blockquote>
  <p>Would appreciate any type of help!</p>