This will give you very nice output with an indented JSON object using JSON.stringify
:
alert(JSON.stringify(YOUR_OBJECT_HERE, null, 4));
The second argument (replacer
) alters the contents of the string before returning it.
The third argument (space
) specifies how many spaces to use as white space for readability.
JSON.stringify
documentation here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…