I recently started working with SheetJS and JS-XLSX and when I read in the file, I am losing some of the sub-headings as a key value.
The file looks like this:
My line of code that brings in the data is:
var data = xlsx.utils.sheet_to_json(workbook.Sheets[sheetName], {range:1});
I'm using range because the first row is instructions, not headings. The object that's returned will have the job titles as the key for the values (for salaries only) and the bonus column has __empty_1: , __empty_2: , etc.
What I need to have the object return is JobTitle.Salary.amount and JobTitle.Bonus.amount
Is there a way to do this with SheetJs or is there a better tool to receive and parse the data?
Thanks for any help!