我很难理解如何使用带有 jQuery 的 handlebars.js 来处理顶级字典数组
我的数据对象不包含带有命名数组对象的字典(这是大多数在线示例处理的内容)。我的数据对象如下所示:
[
{
"Type": "TopLevel",
"Identifier": "123456789IL",
"FullName": "Smith, John H.",
"CurrentLocation": "In Building"
},
{
"Type": "TopLevel",
"Identifier": "123456789OL",
"FullName": "Doe, Jane M.",
"CurrentLocation": "Parking Lot"
}
]
这是一个工作的 jsfiddle(使用命名的数组对象(我没有)和一个非工作的 jsfiddle 与我的实际数据对象(不起作用)。
http://jsfiddle.net/eljaywilson/ZhF5h/ - 有效,但不是我的数据对象的外观