/
shift

shift

Removes the first element of an array (shifting all other elements down by one). Returns array with remaining elements. If an integer is passed as argument, this amount of elements will be removed.

Input:

{{ "John, Paul, George, Ringo" | split: ", " | shift | join: ", " }}

Output:

"Paul, George, Ringo"

Input:

{{ "John, Paul, George, Ringo" | split: ", " | shift: 2 | join: ", " }}

Output:

 

Related content

pop
More like this
unshift
unshift
More like this
push
More like this
Filters
Filters
More like this
to_json
to_json
More like this
breadcrumbs
breadcrumbs
More like this