Jinja Compat Tests

Enabled engines

last filter

Template

{{ items|last }}

Data

{
  "items": [1, 2, 3, 4]
}

v1.10.1

4

v2.8.0

4

v3.0.6

4

v2.5.0

4

v1.4.2

4

v1.24.2

4

v0.9.5

4

Template

{{ [1, 2, 3, 4]|last }}

(error) v1.10.1

Could not parse some characters: |[1, 2, 3, 4]||last

v2.8.0

4

(error) v3.0.6

(no output)

v2.5.0

4

v1.4.2

4

v1.24.2

4

v0.9.5

4

Template

{{ 1234|last }}

(error) v1.10.1

'int' object has no attribute '__getitem__'

(error) v2.8.0

argument to reversed() must be a sequence

(error) v3.0.6

(no output)

(error) v2.5.0

(no output)

v1.4.2

undefined

v1.24.2

4

(error) v0.9.5

(no output)

Template

{{ { a: 1, b: 2, c: 3, d: 4 }|last }}

(error) v1.10.1

Could not parse some characters: |{ a: 1, b: 2, c: 3, d: 4 }||last

(error) v2.8.0

argument to reversed() must be a sequence

(error) v3.0.6

Liquid syntax error: Variable '{{ { a: 1, b: 2, c: 3, d: 4 }' was not properly terminated with regexp: /\}\}/

(error) v2.5.0

(no output)

v1.4.2

4

v1.24.2

4

v0.9.5

4

Template

{{ '1234'|last }}

v1.10.1

4

v2.8.0

4

(error) v3.0.6

(no output)

v2.5.0

4

v1.4.2

4

v1.24.2

4

v0.9.5

4