LiquidJS

TutorialsTagsFiltersPlaygroundAPI
Github Support
Overviewabsappendat_leastat_mostcapitalizeceilcompactconcatdatedefaultdivided_bydowncaseescapeescape_oncefirstfloorjoinjsonlastlstripmapminusmodulonewline_to_brplusprependrawremoveremove_firstremove_lastreplacereplace_firstreplace_lastreverseroundrstripsizeslicesortsort_naturalsplitstripstrip_htmlstrip_newlinestimestruncatetruncatewordsuniqupcaseurl_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: 2023-01-22 PrevNext
Contents
Back to Top
© 2023 Harttle
Documentation licensed under CC BY 4.0.
    TutorialsTagsFiltersPlaygroundAPI
Overviewabsappendat_leastat_mostcapitalizeceilcompactconcatdatedefaultdivided_bydowncaseescapeescape_oncefirstfloorjoinjsonlastlstripmapminusmodulonewline_to_brplusprependrawremoveremove_firstremove_lastreplacereplace_firstreplace_lastreverseroundrstripsizeslicesortsort_naturalsplitstripstrip_htmlstrip_newlinestimestruncatetruncatewordsuniqupcaseurl_decodeurl_encodewhere