Filter by array property

I have to retrieve a list of objects that have certain string inside of an array property:

const users = algoliaClient.initIndex('apps')
return users.search('myId123', { hitsPerPage: 50 });

The apps objects are just like this:

{categories: ['an', 'interesting', 'category']}

How can I search the index for items with a categories property that contains an item in my filters?

@diaz.ailan.gonzalo

You should be able to achieve this by adding the categories attribute to the seachableAttributes configuration option for your Index. Then, whenever your Users search it will also look for that query string inside of this categories attribute as well.

Let me know how this works for you and if we can help any further. Thanks!