mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
461 B
461 B
title, description
| title | description |
|---|---|
| uniq | Liquid filter that removes duplicate items from an array. |
Removes any duplicate items 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: ", " }}