Grouping results of a list

I have looked at a few videos and discussion here, but it is still not clicking.

I have a menu showing product sections with a variable and a workflow to store the section name. On hover the category submenu shows and displays a list of objects matching the menu section

.

This data is retrieved from a categories collection that has subcats, cats & sections, along with their ids. What I would like to do is remove the duplicate displays of the categories which is currently showing each row match. I have tried “groupby” & “filterbykey”, but I am not getting it to work. What is the correct approach to this?

So you’re getting these categories by analyzing all the products and extracting their categories?

Hi,

No so currently I am just trying to extract the categories related to the selected section, pulling for a categories view. The idea will then be to hover over the category and show the related subcategories.

the list will show the items form the selected sub category (hopefully, if I figure it out). Some similair to this menu https://www.archiproducts.com/en

I think you should do this on XANO side, by having a list of subcategories or something similar