res.render('list.ejs', {locals: {list: list}})
list.foreach(function(v,i,a){
if v.sub.length>0 //v.sub is an array
partial('', {collection: v.sub, as: global})
})
--
You received this message because you are subscribed to the Google Groups "Express" group.
To view this discussion on the web visit https://groups.google.com/d/msg/express-js/-/4ntNifrSRsEJ.
To post to this group, send email to expre...@googlegroups.com.
To unsubscribe from this group, send email to express-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/express-js?hl=en.
res.render('list.ejs', {locals: {list: list}}) // list looks like [{sub: someArray}, {sub: [{sub: []}]}]
list.foreach(function(v,i,a){
if v.sub.length>0 //v.sub is an array
partial('list.ejs', {locals: {list: v.sub}})
--
You received this message because you are subscribed to the Google Groups "Express" group.
To view this discussion on the web visit https://groups.google.com/d/msg/express-js/-/2owpf04q22gJ.
To post to this group, send email to expre...@googlegroups.com.
To unsubscribe from this group, send email to express-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/express-js?hl=en.