I have the following array created in my controller:
var data = [];
for (var i = 0; i < array.length; i++) {
nfejs(array[i], function(err, nfe) {
var itemNfe = {};
itemNfe.name = nfe.identificador.getNumero();
data.push(itemNfe);
});
}
nfe.data = data;
That is generated as follows:
data:[{
name: {type: String, required: true, trim: true, default: ""},
}],
I'm trying to read in jade as below, but it does not work:
table#nfe.table.table-striped.table-bordered.table-hover.dt-responsive
thead
tr
th(style='text-align: center') Nome
th(style='text-align: center; width: 25%') Ação
tbody
for nfe in nfes
tr
td(style='text-align: center') #{nfe[data].name}