I have an object (obj
) that contains the content of an excel sheet (using node-xlsx library).
console.log(obj)
gives me the following data structure:
[ { name: 'Autostar Report',
data:
[ [Object],
[],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[],
[object]
]}]
Each of the objects in data
contain values like this:
[
8,
"Enugu - Abuja",
"Sienna Executive ( 1st )",
5,
"9,000",
"45,000",
"5,500",
"39,500"
],
[
14,
"Enugu - Lagos",
"Sienna Executive ( 1st )",
5,
"9,000",
"45,000",
"8,600",
"36,400"
]
Each of the object contained in data
contains 8 values. I want to insert the values into a database table. Each of the value goes to a field in the table.
Please how do I access the values in each data
object?