# Loop through data file with "uniq" array filter

**URL:** https://talk.jekyllrb.com/t/loop-through-data-file-with-uniq-array-filter/425
**Category:** Help
**Created:** [April 12, 2017, 1:05am UTC](https://talk.jekyllrb.com/t/loop-through-data-file-with-uniq-array-filter/425 "2017-04-12T01:05:26Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)
#### Post date: [April 13, 2017, 2:58pm UTC](https://talk.jekyllrb.com/t/loop-through-data-file-with-uniq-array-filter/425/4 "2017-04-13T14:58:28Z")

</div>

Another way to get this done is as follows:

```auto
{% assign titles = site.data.elements | map: 'title' | uniq %}

<ul>
  {% for item in titles %}
    <li>{{ item }}</li>
  {% endfor %}
</ul>

```

---

_[View the full topic](https://talk.jekyllrb.com/t/loop-through-data-file-with-uniq-array-filter/425)._
