JSON.stringify takes 3 parameters. The third parameter can be used to pretty-print the output.

posted on