tera icon indicating copy to clipboard operation
tera copied to clipboard

Nested arrays not supported

Open Bauxitedev opened this issue 3 years ago • 3 comments

Quick question, does tera support nested arrays?

Because making a normal array works fine:

{% set items = [1,2,3,4] %}

...but when I try to create a nested array:

{% set items = [[1,2],[3,4]] %}

...I get this error:

* Failed to parse "templates/base.html.tera"
   --> 158:20
    |
158 |     {% set items= [[1,2],[3,4]] %}␍␊
    |                    ^---
    |
    = expected a value that can be negated

Bauxitedev avatar Jun 02 '22 09:06 Bauxitedev

Not in the current version no

Keats avatar Jun 03 '22 21:06 Keats

Is there any plan to add support for this?

WesleyAC avatar Feb 04 '24 06:02 WesleyAC