I have an excel file with data as below
Sl.No Company Name Designation Salary
n1 ABC Sam Architect 100
n2 ABC Bill Engineer 200
n3 ABC Jill HR 300
n4 XYZ Bill Engineer 250
n5 XYZ Tom Mechanic 150
I want to convert this to a array of a objects as below
arrayObject = [{'Sl.No':'n1', 'company':'ABC', 'Name':'Sam', 'Designation':'Architect','Salary':'100.},
{'Sl.No':'n2', 'company':'ABC', 'Name':'Bill', 'Designation':'Engineer','Salary':'200.},
{'Sl.No':'n3', 'company':'ABC', 'Name':'Jill', 'Designation':'HR','Salary':'300.},
{'Sl.No':'n4', 'company':'XYZ', 'Name':'Bill', 'Designation':'Engineer','Salary':'250.},
{'Sl.No':'n5', 'company':'XYZ', 'Name':'Tom', 'Designation':'Mechanic','Salary':'150.}]
I want this structure so that I can later filter items based on company, Designation, Salary etc. If another structure is good for the purpose, I am open for that as well.
I tried sheet.js in the path https://oss.sheetjs.com/sheetjs/ & I get the output as below & I feel that is not useful for my purpose.
{
"Tabelle1": [
[
"Sl.No",
"Company",
"Name",
"Designation",
"Salary"
],
[
"n1",
"ABC",
"Sam",
"Architect",
100
],
[
"n2",
"ABC",
"Bill",
"Engineer",
200
],
[
"n3",
"ABC",
"Jill",
"HR",
300
],
[
"n4",
"XYZ",
"Bill",
"Engineer",
250
],
[
"n5",
"XYZ",
"Tom",
"Mechanic",
150
]
]
}