create javascript function with an object which provides "prety print" code example
Example: json.stringify pretty
var str = JSON.stringify(obj, null, 2); // spacing level = 2
var str = JSON.stringify(obj, null, 2); // spacing level = 2