{% for attr_key, attr_value in field.getAttributesJsonDecoded() %}
{% if attr_value is not empty and attr_value is not iterable %}
{{ attr_key|capitalize }}:
{% if 'type' in attr_key|lower and (field.type == 'text' or field.type == 'scale' or field.type == 'matrix') %}
<{{ attr_value }}>
{% else %}
{{ attr_value }}
{% endif %}
{% elseif attr_value is not empty and attr_value is iterable and attr_value|length > 0 %}
{{ attr_key|capitalize }}:
({% for a in attr_value %}{% if a.text is not null %}{{ a.text }}{% elseif field.type == 'scale' and a.labelLeft is not empty and a.labelRight is not empty %}{% if a.subheadline is not null and a.subheadline is not empty %}{{ a.subheadline }}: {% endif %}{{ a.labelLeft }} {{ a.labelRight }}{% elseif field.type == "matrix" and a.question is not empty %}{{ a.question }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %})