How to create dynamic rows for table in jade. My data for rows will be coming from MongoDB rendered by nodejs. Here is my MongoDB document =>
{
"_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"
}
]
}
I want taskDescription values to be disaplayed in rows.
table
thead
tr
th Description
tbody
each task in tasks
tr
td=task.taskDescription
For future reference, you can test out your jade templates here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With