My website is a tutoring website and my tutors select their subjects via a checkbox group, their choices are then stored in a database. See the figure below to see how their data is collected.
![](https://static.wixstatic.com/media/a27d24_109ae52b8ded4860adb0662054ccd372~mv2.png/v1/fill/w_49,h_25,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/a27d24_109ae52b8ded4860adb0662054ccd372~mv2.png)
I then have a dynamic page with a repeater that shows a preview profile for each of my tutors. I want to filter that repeater/dataset by the same input seen above. So that a client can come on and select what subjects they would like and the repeater will filter accordingly. The image below is how my database is set up.
![](https://static.wixstatic.com/media/a27d24_a9ea89de908047ecb904ef3753454b2d~mv2.png/v1/fill/w_46,h_8,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/a27d24_a9ea89de908047ecb904ef3753454b2d~mv2.png)
Notice it is categorised by subject. I have tried a lot of different methods, but have run into a lot of issues when trying to compare two arrays to each other inside a filter. What I have currently can be seen below, I am only trying to filter by one subject currently, but it is just filtering everything out.
import wixData from "wix-data";
export function math_change(event){
console.log(event["target"]["id"])
let subject = event["target"]["id"];
let values = event["target"]["value"];
console.log(values)
filter(subject,values)
//let chosen = $w()
}
function filter(subject, values){
var qry = wixData.query("Team") // initialise query
$w('#teamDataset').setFilter(
wixData.filter()
.hasSome(subject, values)
)
.catch((err) => {
console.log("error: " + err)
})
Sorry it is not formatted properly I tried to paste it into a code snippet but it put it in the above form. Any help would be greatly appreciated and I am open to different ways to approach it I just thought this was a very user-friendly approach, cheers.