Answer the question
In order to leave comments, you need to log in
How to display an array of objects in a .jade file?
var users = [{name:"Sony"},{name: "Xbox"}]; // Sent to file.jade with renderFile
_____file.jade
ul
li
What does file.jade need to be to get this?:
<ul>
<li>Sony</li>
<li>Xbox</li>
</ul>
Answer the question
In order to leave comments, you need to log in
ul
each val, index in ['zero', 'one', 'two']
li= index + ': ' + val
ul
each user, index in users
li= user.name
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question