# Filter Array by Array?

**URL:** <https://community.weweb.io/t/filter-array-by-array/411>\
**Category:** How do I?\
**Created:** [April 12, 2022, 9:58pm UTC](https://community.weweb.io/t/filter-array-by-array/411 "2022-04-12T21:58:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyanaloe](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/kyanaloe/32/1076_2.png) [@kyanaloe](https://community.weweb.io/u/kyanaloe)\
**Post date:** [April 12, 2022, 9:58pm UTC](https://community.weweb.io/t/filter-array-by-array/411/1 "2022-04-12T21:58:16Z")

</div>

I have a collection with an array field. For example, imagine Record A has a “numbers” field with [1,2,3], and Record B has a “numbers” field with [4,5,6].

Let’s say I want to filter this collection using a multiselect element. So, I want to display records with “numbers” fields that contain the same numbers as those selected in the multiselect element. So, if I include [1,4] in the multiselect element, both Records A and B would display. If I include [1,2] in the multiselect element, only Record A should display.

Is there any way to currently accomplish this?

---

<div class="post-metadata">

**Author:** ![kevinwasie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/kevinwasie/32/402_2.png) [@kevinwasie](https://community.weweb.io/u/kevinwasie)\
**Post date:** [April 13, 2022, 5:04am UTC](https://community.weweb.io/t/filter-array-by-array/411/2 "2022-04-13T05:04:47Z")

</div>

I think you can just do this with a standard filter, using contains.

So, set up your collection, with the filter on it, where “collection-field-to-sort” CONTAINS, whatever is in the multi select.

I’m not in front of my computer right now, but I’m pretty sure the filter will search through the array for that value.
