(# -- index is an array-- #) {%- for col in index.columns %} {%- if loop.first and not loop.last %} {%- set ColumnString = ColumnString + col.name + "," -%} {%- else -%} {%- set ColumnString = ColumnString + col.name -%} {% endif -%} {%- endfor %}