小编Ila*_*a G的帖子

如何与液体并行迭代两个数组

我有 2 个数组“a_group”[a,a,a,a] 和“b_group”[b,b,b]
我正在使用以下循环进行迭代:

 {% for  a in a_group and b in b_group %}
         <p> {{ a }}: {{b}} </p>  
{% endfor %}
Run Code Online (Sandbox Code Playgroud)

预期结果:
a: b
a: b
a: b
a: 无可用数据

我实际得到的是:
a:没有可用数据
a:没有可用数据
a:没有可用数据
a:没有可用数据

liquid shopify

3
推荐指数
1
解决办法
1495
查看次数

标签 统计

liquid ×1

shopify ×1