JSON file generator

Hi

I have a josn file for levels and it comes in this format:

{
    “levelGen”: [
        0, 0, 3, 0, 2, 2, 0, 3, 0, 0,
        0, 0, 4, 0, 1, 1, 0, 2, 0, 0,
        0, 0, 5, 0, 1, 1, 0, 7, 0, 0,
        0, 0, 0, 6, 2, 2, 0, 4, 0, 0,
        0, 0, 5, 0, 1, 1, 0, 7, 0, 0,
        0, 0, 5, 0, 1, 1, 0, 7, 0, 0,
        0, 5, 5, 5, 1, 1, 0, 7, 6, 5
    ]
}

I have a file with over 800 levels but it comes in this format

6   6   4   4   2   2   3   3
  6   6   4   4   2   2   3
2   2   3   3   6   6   4   4
  2   3   3   6   6   4   4
0   0   0   0   0   0   0   0
  0   0   0   0   0   0   0
0   0   0   0   0   0   0   0
  0   0   0   0   0   0   0
0   0   0   0   0   0   0   0
  0   0   0   0   0   0   0

Is there a way I can add comas and fill the empty space to make this 800 levels same as above json format?

Thanks

How are you outputting the data?

How are you outputting the data?