js json_encode pretty
snippet in javascript

js json_encode pretty

user6303

var str = JSON.stringify(obj, null, 2); // spacing level = 2