how to prettify json in javascript code example Example: js json stringfy beutify JSON.stringify(obj, undefined, 2);