Hi, how do I programatically access the column labels?
This code gives me the column keys only. I want to be able to access column labels.
Hi, how do I programatically access the column labels?
This code gives me the column keys only. I want to be able to access column labels.
I created a transformer to expose the tableβs column names, and it worked perfectly.
Hereβs the code I used:
return {{
Object.keys(dailyDataTbl._columnKey).reduce((out, colId) => {
const key = dailyDataTbl._columnKey[colId];
const label = dailyDataTbl._columnLabel[colId];
out[key] = label;
return out;
}, {})
}};
This returns an object where each column key is mapped to its label.