Return unique categories from search box

Is there a way in vue-instantsearch to return a list of unique categories from the results?

Such as three products are shorts, and three are t-shirts, I want a list of category names with just two items [‘shorts’,‘t-shirts’]?

Hi there,
Thanks for reaching out to us.

If you’re using vue-instantsearch, you can do that with ais-state-results.

Check the sandbox above and at line 32 on App.vue you’ll see how it’s done.

Let me know how it goes and if you have any question.

Thanks.

1 Like