json格式化输出

JSON.stringify(jsObj, null, "\t"); // 缩进一个tab
JSON.stringify(jsObj, null, 4);    // 缩进4个空格对象

 

还有这个console.dir();可以输出对象的解析格式string

相关文章
相关标签/搜索