I'm not sure how to use object.keys with the filter

0

remembering "data" and an array object, I am trying to mount this table with ecmascript 6.

 var dados[{"N1":"Nome","N2":"Sobrenome"},
      {"N1":"felipe","N2":"Almeida"},
      {"N1":"Marcelo","N2":"Freitas"}];

var tbody = "<tr>";
    dados.filter(function (item, k) {
        return item.N1 == unicos[i];
    }).Object.keys(item).forEach((linha,) => {
        tbody += "<td>" + linha[item]+ "</td>";
    });
    tbody += "</tr>";

append(tbody);
    
asked by anonymous 01.02.2018 / 14:18

0 answers