Skip to content

Appending a list #414

Answered by mitsuhiko
bocc asked this question in Q&A
Feb 27, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

They are immutable. You can only add an append filter and then to something like this:

{% set some_list = [0, 1, 2] %}
{% set some_list = some_list|append(3) %}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bocc
Comment options

@mitsuhiko
Comment options

Answer selected by bocc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants