Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我可以这样做:
{% for x in data %} {{ x.label }}: {{ x.value }}<br /> {% endfor %}
但我想做这种事情来获得一个特定的价值:
{{ data['label' }}
我不知道该怎么做,但它必须是可能的。
http://twig.sensiolabs.org/doc/functions/attribute.html
{{属性(数据,'标签')}}