How to use the [$in] operator in the api?

Hi, I think the documentation is lacking here. It tells me there is an [$in] operator
to be used when filtering in an api request. But it doesn’t tell me the syntax for the array to follow. I tried many combinations - none worked. I think it’s clear from the example what I’m trying to do:

localhost:1337/api/animals?filters[Tags][Name][$in]=tag1,tag2
(getting all animals that have either tag1 or tag2)

can anyone help me with this?
regards, Simon

Got it.

localhost:1337/api/animals?filters[Tags][Name][[$in][0]=tag1&filters[Tags][Name][[$in][1]=tag2

Although this imo is an… interresting syntax. I don’t really get why it’s not just …[$in]=tag1,tag2…
Well it is how it is.

1 Like