Which format to use with javascript/JSON file

I don’t think there’s any advantage in converting this array into a 2d array. You could just use a function like this, which is what Tiled is doing:

function tileAt(x, y) {
    return tiles[x + y * width];
}