I'm using a for loop to gather topics from all blog posts and populate those topics in a select element. I'm currently seeing duplicates due to the same topics across multiple blog posts. Here is my code:
<!-- Services Filter -->
<select class="select-filter" data-filter-group="services">
<option value="*">Services</option>
{% for content in contents %}
{% for topic in content.topic_list %}
<option value=".filter-{{ topic.name|lower|replace(' ','-') }}">{{ topic.name }}</option>
{% endfor %}
{% endfor %}
</select>
I see that there is a HubL filter for unique. I tried a few things but didn't have any luck. How would I incorporate the unique filter so there are no duplicate topics in my select element?