{{ v|lower }}{% if last %},{% else %}{% endif %} {%- else %} "{{ k }}" => "{{ v }}"{% if last %},{% else %}{% endif %} {%- endif %} {%- endfor %} {%- elif value is sequence and value is not string -%} array( {%- for value2 in value %} {{ mac(value2,loop.last) }} {%- endfor -%} ), {%- elif value is true or value is false -%} {{ value|lower }}, {%- elif value is number -%} {{ value }}, {%- else -%} "{{ value }}", {%- endif %} {%- endmacro %} $CONFIG = array( {%- for key, value in nextcloud.config.items() %} "{{ key }}" => {{ mac(value,loop.last) }} {%- endfor %} );