Sort refinementlist items into two sections

Hi Algolia community,

I am using GatsbyJS with a Wordpress headless backend where I have two sets of categories with parent categories Location and Sector. When I retrieve the items from refinement list they are all within the one array and no way to differentiate between the two parent categories (due to only being able to select one attribute). the ultimate goal is to create the UI from the image attached (2 groups location and sector). Any ideas how to ‘categorise’ / ‘group’ the refinement list items labels while keeping the current functionality?

Thanks

Matthew

I WANT:

I HAVE: