uniq

移除陣列中任何重複的項目。

輸入

{% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}

{{ my_array | uniq | join: ", " }}

輸出



ants, bugs, bees