Im trying to create multiple lists based on two different arrays. I have an array called categoryList and termsList. I want to group the terms list based on a property to the categoryList array.

```
const categoriesList = [
   { name: 'Categories', slug: 'category' },
   { name: 'Tags', slug: 'post_tag' }
];

```

and

```
const termsList = [
   { id: 1, taxonomy: 'category', name: 'First category' },
   { id: 2, taxonomy: 'category', name: 'Second category' },
   { id: 3, taxonomy: 'post_tag', name: 'First tag' },
   { id: 4, taxonomy: 'post_tag', name: 'Second tag' }
];

```

The property slug in the categoriesList always has the same value as the taxonomy property in the termsList.
What i'm trying to accomplish is this within a React component:

```
<h1>Categories</h1>
<ul>
   <li>First category</li>
   <li>Second category</li>
</ul>

<h1>Tags</h1>
<ul>
   <li>First tag</li>
   <li>Second tag</li>
</ul>

```

I don't know how to do this. Some help would be greatly appreciated.
Thanks!