I'm having this map function to map through some table data.
const Rows = dataToFilter.children.map((row: any) => {
return row.table_row;
});
console.log("ROWSSS", Rows);
...and as a result i'm getting this complex array of objects:
How can i get the two columns of arrays highlited?
CodePudding user response:
Don't have the data to test, but this could be a possibility
const Rows = dataToFilter.children.map((row: any) => {
const [colOne, colTwo] = row.table_row.cells;
return {
colOne,
colTwo
}
});