I think, your option is easier, but since saving to LocalStorage, saving a dictionary as JSON takes less time since it only saves one Local Storage item instead of multiple.
No offense, just trying to figure out what's more efficient.
no offense taken, ha ha, i just didn't knew array are saved as 1 file in json ... might be much less time consuming your approach, but maybe a little to complex?
mine just uses direct numbers, for prebuilt like template games, nothing that is randomly generated. which i think his template doesn't need to over complicate to much, since its a small sidescrooler.
im now curious about your array/ json approach sounds something that could benefit a more complex game or database.