我的django模板中有json值,我需要为其中的每个值循环
{
"hits": [
{
"_index": "catalog",
"_type": "mobiles",
"_id": "2e4d3356-95eb-4cc2-b4be-f75baa55248f",
"_score": 1,
"_source": {
"name": "Apple iPhone 5S 16GB Space Grey",
"product_score": "109",
"product_rating": {
"avg": "5",
"count": "1"
}
}
}
]
}
我应该如何在“\u source”中迭代?
此代码无效:
{% for i in hits.items %}
<div>{{i}}</div>
{% endfor %}
主要的疑问是如何在“\(下划线)”元素中循环
目前没有回答
相关问题 更多 >
编程相关推荐