LiquidJS

TutorialsTagsFiltersPlaygroundAPI
Github Support
Overviewabsappendat_leastat_mostcapitalizeceilcompactconcatdatedefaultdivided_bydowncaseescapeescape_oncefirstfloorjoinjsonlastlstripmapminusmodulonewline_to_brplusprependrawremoveremove_firstremove_lastreplacereplace_firstreplace_lastreverseroundrstripsizeslicesortsort_naturalsplitstripstrip_htmlstrip_newlinessumtimestruncatetruncatewordsuniqupcaseurl_decodeurl_encodewhere

uniq

v1.9.1

Removes any duplicate elements in an array.

Input

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

Output

ants, bugs, bees
Last updated: 2024-02-18 PrevNext
Contents
Back to Top
© 2024 Harttle
Documentation licensed under CC BY 4.0.
    TutorialsTagsFiltersPlaygroundAPI
Overviewabsappendat_leastat_mostcapitalizeceilcompactconcatdatedefaultdivided_bydowncaseescapeescape_oncefirstfloorjoinjsonlastlstripmapminusmodulonewline_to_brplusprependrawremoveremove_firstremove_lastreplacereplace_firstreplace_lastreverseroundrstripsizeslicesortsort_naturalsplitstripstrip_htmlstrip_newlinessumtimestruncatetruncatewordsuniqupcaseurl_decodeurl_encodewhere