uniq
移除数组中任何重复的项。
输入
{% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
{{ my_array | uniq | join: ", " }}
输出
ants, bugs, bees
移除数组中任何重复的项。
输入
{% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
{{ my_array | uniq | join: ", " }}
输出
ants, bugs, bees