title: Django Queryset filter array field by exact string
body: <p>so I haven't been working with Django for too long. I am running into a problem filtering a queryset by the exact name of a string of arrays that is passed into it. Currently, I am filtering the queryset by icontains, which works. For example the current implementation works like this: If I pass in one string called &quot;test&quot; my queryset will be filtered and show deals with tags &quot;test1&quot; &quot;test2&quot; and &quot;test3&quot;. This is not what I want. I want to filter by the exact name of the strings that are passed in. So if I have a &quot;test&quot; as one of the strings then my queryset will only search for test, not anything that is contained into it. I've tried multiple implementations, such as switching from icontains to iexact, and exact.</p>
  <p>Goal. Filter queryset by array of multiple tags.</p>
  <p>old query: values is an array of tags (strings) that are passed in</p>
  <pre><code>values = value.replace(&quot; &quot;, &quot;&quot;).split(&quot;,&quot;)
  return qs.filter(reduce(operator.or_, (Q(tags__iontains=item) for item in values)))
  </code></pre>
  <p>What I have tried: I have tried passing in the iexact with the list of values like below. I have also tried just passing iexact, and then passing in only one hardcoded string from an array. When I pass in just a string with iexact, I run into an error that says: &quot; Unsupported lookup '' for ArrayField or join on the field not permitted&quot; which makes sense because this is an array.</p>
  <pre><code>values = value.replace(&quot; &quot;, &quot;&quot;).split(&quot;,&quot;)
  return qs.filter(reduce(operator.or_, (Q(tags__iexact=item) for item in values)))
  </code></pre>
  <p>Has anyone ran into this issue and know a work around? I've been reading through the docs and stack overflow and can't find a solution.</p>