Jinja Compat Tests

Enabled engines

attribute function

Template

{{ attribute(items, 2) }}

Data

{
  "items": ["alpha", "bravo", "charlie", "delta"]
}

(error) v1.10.1

Could not parse the remainder: '(items, 2)' from 'attribute(items, 2)'

(error) v2.8.0

'attribute' is undefined

(error) v3.0.6

(no output)

(error) v2.5.0


  Error: Unable to call `attribute`, which is undefined or falsey

(error) v1.4.2

(no output)

v1.24.2

charlie

v0.9.5

charlie

Template

{{ attribute(mapping, 'x') }}

Data

{
  "mapping": {
    "x": "alpha",
    "y": "bravo",
    "z": "charlie"
  }
}

(error) v1.10.1

Could not parse the remainder: '(mapping, 'x')' from 'attribute(mapping, 'x')'

(error) v2.8.0

'attribute' is undefined

(error) v3.0.6

(no output)

(error) v2.5.0


  Error: Unable to call `attribute`, which is undefined or falsey

(error) v1.4.2

(no output)

v1.24.2

alpha

v0.9.5

alpha