mirror of
https://github.com/kemko/liquid.git
synced 2026-01-06 18:25:41 +03:00
462 B
462 B
title, description
| title | description |
|---|---|
| uniq | Liquid filter that removes duplicate items from an array. |
Removes any duplicate elements in an array.
Input
```liquid {% raw %} {% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}{{ my_array | uniq | join: ", " }} {% endraw %}
<p class="code-label">Output</p>
```text
{% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
{{ my_array | uniq | join: ", " }}