谁能建议我的模板循环应该如何在以下示例中循环 JSON 数据?
演示在这里:http: //jsfiddle.net/Seefeld/LbVEH/
{
"0": {
"Dosage": "25",
"Drug": "Indocin",
"Patient": "David",
"Date": "15/11/2012 14:29:14"
},
"1": {
"Dosage": "50",
"Drug": "Enebrel",
"Patient": "Sam",
"Date": "15/11/2012 14:29:14"
},
"2": {
"Dosage": "10",
"Drug": "Hydralazine",
"Patient": "Christoff",
"Date": "15/11/2012 14:29:14"
},
"3": {
"Dosage": "21",
"Drug": "Combivent",
"Patient": "Janet",
"Date": "15/11/2012 14:29:14"
},
"4": {
"Dosage": "100",
"Drug": "Dilantin",
"Patient": "Melanie",
"Date": "15/11/2012 14:29:14"
}
}
我看到的所有示例都mustache.js
假设您知道对象名称。
任何建议都非常感谢。