Algolia array query

I’ve tried and I did’t find solution.

This is an example for an array I have in my database:

{
 Users:{
    {
    "name":"User1",
    "interest":["cats"]
    },
    {
    "name":"User2",
    "interest":["dogs"]
    },
    {
    "name":"User3",
    "interest":["bird"]
    }
  }
}

I want to search on all user. For example, interest = cats or dogs or bird.

I read algolia documentation and there are filter feature as :“interest:cats or interest:dogs” - but this is not programmatic. How can I make it programmatic?

My second problem is when I write a cat and a dog, the result is null value, but when I write cats and dogs(plural, like the value in the database) the result is true. How can I fix this?

Thanks,

Blockquote

Blockquote

Hello, linking to the stackoverflow duplicate inquiry:

We hope it was helpful. If any questions, please let us know.

Happy Coding!