【发布时间】:2018-03-04 08:24:52
【问题描述】:
这是 JSON:
{
"_id" : ObjectId("59c3edd10e2a6f083e858036"),
"email" : "aa@aa.com",
"username" : "aa",
"password" : "$2a$10$WcUgbqFjsx.0BwkdEyDNP.R84vz1d7faaL8K0ORcIoBOXOAHxCS3.",
"words" : [
{
"Name" : "xyz"
}
],
"title" : [
],
"__v" : NumberInt(0),
"name" : "obbk"
}
这是我在words中显示数据的代码
{{#users}}
{{#words}}
<h3>{{this.Name}}</h3>
{{/words}}
{{/users}}
但它不起作用。
所以我想知道如何解决这个问题,如何在words 中显示Name,在nodejs 中使用把手作为模板从MongoDB 数据库中JSON 的数组中获取数据。
【问题讨论】:
标签: javascript json node.js express handlebars.js