I'm loading an Excel file and with the SheetJS library I convert it into a JSON, but I receive it this way:(我正在加载一个Excel文件,并通过SheetJS库将其转换为JSON,但是我通过以下方式收到它:)
JSON.parse(output)(JSON.parse(输出))
data: Array(15)
0: (11) ["id", "created", "device", "plataforma", "locale", "first_render_time", "total_load_time", "total_size", "load_without_js", "request", "score"]
1: (11) ["424", "2019-11-19T23:58:07.977Z", "mobile", "PSI", "es-CO", "9840", "37602", "6286909", "3978", "227", "0"]
2: (11) ["423", "2019-11-19T23:57:43.340Z", "desktop", "PSI", "es-CO", "1981", "7903", "5424580", "3452", "204", "0.19"]
3: (11) ["422", "2019-11-19T23:55:24.163Z", "mobile", "PSI", "es-CO", "10052", "38450", "5850544", "3506", "231"
The first row must be the JSON name
.(第一行必须是JSON name
。)
I want to receive it this way.(我想这样收到。)
[
{
id: 6049,
created: "2019-11-29T20:05:22.870Z",
device: "desktop",
plataforma: "PSI",
locale: "es-CO",
first_render_time: 2042,
total_load_time: 7904,
total_size: 6000627,
load_without_js: 3722,
request: 212,
score: "0.18"
},
{
id: 6046,
created: "2019-11-29T20:00:23.317Z",
device: "desktop",
plataforma: "PSI",
locale: "es-CO",
first_render_time: 2052,
total_load_time: 7974,
total_size: 6001442,
load_without_js: 3648,
request: 212,
score: "0.18"
}
]
ask by Rafael Pereira translate from so