LiquidJS

TutorialsTagsFiltersPlaygroundAPI
GitHub
Overviewabsappendarray_to_sentence_stringat_leastat_mostcapitalizeceilcgi_escapecompactconcatdatedate_to_long_stringdate_to_rfc822date_to_stringdate_to_xmlschemadefaultdivided_bydowncaseescapeescape_oncefindfind_expfind_indexfind_index_expfirstfloorgroup_bygroup_by_exphashas_expinspectjoinjsonjsonifylastlstripmapminusmodulonewline_to_brnormalize_whitespacenumber_of_wordspluspoppushprependrawrejectreject_expremoveremove_firstremove_lastreplacereplace_firstreplace_lastreverseroundrstripshiftsizesliceslugifysortsort_naturalsplitstripstrip_htmlstrip_newlinessumtimesto_integertruncatetruncatewordsuniqunshiftupcaseuri_escapeurl_decodeurl_encodewherewhere_expxml_escape

split

v1.9.1

Divides a string into an array using the argument as a separator. split is commonly used to convert comma-separated items from a string to an array.

Input

{% assign beatles = "John, Paul, George, Ringo" | split: ", " %}

{% for member in beatles %}
  {{ member }}
{% endfor %}

Output





John

Paul

George

Ringo
Last updated: 2025-04-03 PrevNext
Contents
Back to Top
© 2025 Harttle
Documentation licensed under CC BY 4.0.
    TutorialsTagsFiltersPlaygroundAPI
Overviewabsappendarray_to_sentence_stringat_leastat_mostcapitalizeceilcgi_escapecompactconcatdatedate_to_long_stringdate_to_rfc822date_to_stringdate_to_xmlschemadefaultdivided_bydowncaseescapeescape_oncefindfind_expfind_indexfind_index_expfirstfloorgroup_bygroup_by_exphashas_expinspectjoinjsonjsonifylastlstripmapminusmodulonewline_to_brnormalize_whitespacenumber_of_wordspluspoppushprependrawrejectreject_expremoveremove_firstremove_lastreplacereplace_firstreplace_lastreverseroundrstripshiftsizesliceslugifysortsort_naturalsplitstripstrip_htmlstrip_newlinessumtimesto_integertruncatetruncatewordsuniqunshiftupcaseuri_escapeurl_decodeurl_encodewherewhere_expxml_escape