# Map a filter on an array?

**URL:** <https://zola.discourse.group/t/map-a-filter-on-an-array/1460>\
**Category:** Support\
**Created:** [September 10, 2022, 10:43am UTC](https://zola.discourse.group/t/map-a-filter-on-an-array/1460 "2022-09-10T10:43:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Geobomatic](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/geobomatic/32/109_2.png) [@Geobomatic](https://zola.discourse.group/u/Geobomatic)\
**Post date:** [September 12, 2022, 1:25pm UTC](https://zola.discourse.group/t/map-a-filter-on-an-array/1460/2 "2022-09-12T13:25:01Z")

</div>

Did a workaround, see the end of this post:

> [@Allow \`load\_data\` to take a literal?](https://zola.discourse.group/t/allow-load-data-to-take-a-literal/1165/3):
>
> Thanks for this PR! is is possible to have some variable rendering in the “literal”? {% macro print\_tags(page) %} {% set\_global tags = [] %} {% for t in page.taxonomies["tags"] %} {% set s = t | slugify %} {% set obj = load\_data(literal='{ "slug": "{{s}}", "tag": "{{t}}" }', format="json") %} {% set\_global tags = tags | concat(with=obj) %} {% endfor %} {% for tag in tags | sort(attribute="slug") %} \<a href="/tags/{{ tag['slug'] }}" class="tag"\>{{ tag['tag'] }}\</a\>{% if not loop.last %}, {% e…

But it’s still a cool feature to have, not with `map` as it’s taken, maybe `apply`

---

_[View the full topic](https://zola.discourse.group/t/map-a-filter-on-an-array/1460)._
