Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Clean the key off the row if it was not requested
if (!returnKeyColumn) {
const newRowContent = [];
_.each(row.keys(), eachKey => {
if (eachKey !== keyColumnName) {
newRowContent.push({
key: eachKey,
value: row.get(eachKey),
column: _.find(columns, eachItem => {
return eachItem.name === eachKey;
})
});
}
});
row = new Row(_.pluck(newRowContent, 'column'));
_.each(newRowContent, eachNewRowContent => {
row[eachNewRowContent.key] = eachNewRowContent.value;
});
}
requestedRowColumns.push(row);
});
rows = requestedRowColumns;