System Information
- Strapi Version: 4.3.6
Hello,
I have a collection “Source” with a string array attribute called “types” and a string name.
For example I have a source like:
name: "MySource"
types: ["Awsome", "Super", "Great"]
(Size of types array is variable)
I want to query “Source” depending its types. I have a types array as input (size is variable) and i want all its elements to be in the types of my ouput sources.
For example
If my input array is [“Awsome”] or [“Awsome”, “Super”], “MySource” is expected in output.
If my input array is [“Awsome”, “Fantastic”], “MySource” is not expected in output.
To do that, I naturally used the “in” opperator
query {
sources(
filters: {
types: {
in: ["Awsome", "Fantastic"]
}
}){
data {
attributes {
...
}
}
}
}
In this query, “MySource” is in output, because “in” think like “Awsome is one of its types and Awsome is in the list, so its ok”.
So it doesn’t work as expected. How can I do this kind of operation ?
Thanks for your help (And sorry for my english )