Open feli5 opened 4 years ago
<dependency>
<groupId>com.hubspot.jinjava</groupId>
<artifactId>jinjava</artifactId>
<version>2.4.8</version>
</dependency>
<dependency> <groupId>com.hubspot.jinjava</groupId> <artifactId>jinjava</artifactId> <version>2.4.8</version> </dependency>
Version of jinjava
I want to use default filter to set default values when value is not defined. But seems dict and list of default is not supported
In below case when resources.lbs is not defined, will still output content in for loop
{% for lb in resources.lbs|default({}) %} do some thing {% endfor %}
In below case when resources.lbs is not defined, will not output content in for loop
{% if resources.lbs is not defined %} {% set lbs = {} %} {% else %} {% set lbs = resources.lbs %} {% endif %} {% for lb in lbs %} do some thing {% endfor %}