DEV Community

Discussion on: Easily parse an excel spreadsheet into JSON

Collapse
 
waldtq profile image
wald-tq

you can simplify the code like this and get rid of the loop and ifs:

let currentRow = {id: row.values[0], name: row.values[1], img: row.values[2]}

Collapse
 
nena profile image
Nena

You're right, thanks! I can't believe I didn't think of that before. :D