pop - Liquid Filter Reference
On this page
Description
Removes the last item from an list
| Property | Value |
|---|---|
| Return Type | any |
| Category | lists |
Examples
liquid
Removed: {{ my_list | last }}
Now have: {{ my_list | pop | join: ", " }}
Output: Removed: 5\nNow have: 1, 2, 3, 4