在jade中动态创建表

Tus*_*har 3 mongodb node.js pug

如何在jade中为表创建动态行.我的行数据将来自nodejs呈现的MongoDB.这是我的MongoDB文档=>

{
    "_id" : ObjectId("55429a92bf0adf38ce82052f"),
    "userid" : "103",
    "projectName" : "Nodejs Project",
    "startDate" : "03/15/2015",
    "endDate" : "05/15/2015",
    "tasks" : [ 
        {
            "taskid" : "5",
            "taskDescription" : "Task 5"
        }, 
        {
            "taskid" : "6",
            "taskDescription" : "Task 6"
        }, 
        {
            "taskid" : "7",
            "taskDescription" : "Task 7"
        }
    ]
}
Run Code Online (Sandbox Code Playgroud)

我希望在行中删除taskDescription值.

Jos*_* C. 6

table
  thead
    tr
      th Description
  tbody
    each task in tasks
      tr
        td=task.taskDescription
Run Code Online (Sandbox Code Playgroud)

对于未来的参考,你可以测试出你的玉模板这里.