Hopefully I will be able to explain it correctly. I have state => Array named courses, which on render stores the data from my API call.
Now if I loop through all of the items I get this (1 result out of 25):
{
course_department: 'Department A',
course_pathway: 'BOL',
course_werkgever: 'DeltaL',
}
Now, what I would like to, since more items have the same value course_werkgever
I would like to extract this once, for each different course_werkgever
type and push it to a new array.
So, that I can use it inside my html like this:
<select>
<option value="">Sorteer by Course</option>
<option value="DeltaL">DeltaL</option>
<option value="DRZ">DRZ</option>
<option value="FIA">FIA</option>
</select>
How can this be done?