I need to create a simple filter on strapi together with qs.
All these parameters are optional and are added by clicking on the checkbox.
The problem is that I can't make a filter based on an array, I use $in to match the values from the incoming array with the server and get an error
export interface responseFilterType {
type_product?: [string]
user_type?: [string]
weight?: string | number
}
qs.stringify({
populate: "*",
filters: {
$and: [
{
...(value.type_product && {
type_product: {
$in: value.type_product,
}
})
},
{
...(value.user_type && {
user_type: {
$in: value.user_type,
}
})
}
] ,
},
}, {
encodeValuesOnly: true, // prettify URL
});
Main type
type_product & user_type





That's what I got, thanks
@antokhio