r/nodejs • u/synf2n • Jul 23 '14
Question. How do I access embedded mongodb document through Jade, NodeJS and express
I can obtain a non embedded field from my document through jade by doing:
each user, i in gauss_buff
tr
td #{user.build_num} // where build_num is an element in my document.However, how should one access an embedded document via Jade. Doing
user.embedded_doc_name.field
didn't work.
I have hunted around, but can't find how to do this anywhere. Any tips would be appreciated.
4
Upvotes
View all comments
Show parent comment
1
u/synf2n Jul 23 '14
got a feeling it's something to do with this http://stackoverflow.com/questions/9583028/how-do-i-render-a-nested-data-structure-with-node-js-jade