Sequelize PostgreSQL: query to see if string is within an array
<p>Given that I have a model called <code>Model</code> with a column called <code>items</code> which holds an array of strings, how can I query to see whether a string <code>queryString</code> is in the array or has a similar element in the array?</p>

<p><strong><em>Example:</em></strong></p>

<p><code>items: ["cat", "dog", "bird", "turtle", "doe" ]</code></p>

<p><code>queryString = ["%do%","%b"]</code></p>

<p><strong>Should return</strong>:</p>

<p><code>animalArray = ["dog", "doe", "bird"]</code></p>

<hr>

<p><strong>Edit:</strong> Is there anyway to pair up an $overlap with $iLike somehow?</p>

<pre><code>Model.findAll({
    where: {
        items: { $in: { $iLike: { $any: queryString } } }
    }
}).then(function(array){
    // Do whatever here with array
})
</code></pre>

<p><code>$iLike</code> is a special Postgres thing in <a href="http://docs.sequelizejs.com/en/latest/docs/querying/" rel="nofollow noreferrer">Sequelize</a></p>

<p>Thanks!</p>