Answer the question
In order to leave comments, you need to log in
How to output data from array in pug loop?
var list = [{
class: [ 'items'],
desc: 'items 1'
},
{
class: [ 'items'],
desc: 'items 2'
},
{
class: [ 'items'],
desc: 'items 3'
},
{
class: [ 'items', 'active'],
desc: 'items 4'
},
{
class: [ 'items'],
desc: 'items 5'
},
{
class: [ 'items'],
desc: 'items 6'
}]
ul
each item in list
li(class=list.class)= list.desc
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question