📜  pebble 循环遍历数组 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:54.849000             🧑  作者: Mango

代码示例1
(# -- 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 %}