Hi i have a two for loop contains checking the each loop length and push into key value pair of array
for (var i=0; i<allTextLines.length; i++) {
var data = allTextLines[i];
if (data.length == headers.length) {
var tarr = [];
for (var j=0; j<headers.length; j++)
{
****tarr.push({headers[j]:data[j]})****
}
lines.push(tarr);
}
}
i need to push headers[j] as key but i can’t.How to do that in JS ? I’m literally new . please bare me.THanks