As suggested by @MikkoOhtamaa, I'll use a dictionnary
options = [
{
'name': 'Option 1',
'plan': {1: True,},
},
{
'name': 'Option 2',
'plan': {2: True,},
},
{
'name': 'Option 3',
'plan': {2: True, 3: True,},
},
]
Then I should be able to make my checks as:
{% for option as options %}
<div>
<div>{{ option.name }}</div>
<div>{% if option.plan.1 %}✔{% endif %}</div>
<div>{% if option.plan.2 %}✔{% endif %}</div>
<div>{% if option.plan.3 %}✔{% endif %}</div>
</div>
{% endfor %}