Looking to loop through tags from entries but limit to only show tags that are being used on entries. Right now this just loops through any and all created tags.
I tried limit to null but have had no luck getting that to work.
{% set categories = craft.categories.group('storiesCategories').find %}
{% set tags = craft.tags.group('storiesTagGroup').find %}
{% set elements = categories|merge(tags) %}
<ul class="pills">
<li><a href="javascript:void(0);" class="btn btn-secondary filter" data-filter="all">All</a></li>
{% for element in elements | supersort('natcasesort') %}
<li><a href="javscript:void(0)" class="btn btn-secondary filter" data-filter=".category-{{ element.title|kebab }}">{{ element.title|capitalize }}</a></li>
{% endfor %}
</ul>