JSFiddle - React, Tailwind, and code Playground

test JSON parsing of objects

by Kato Richardson

HTML

<pre></pre>

JavaScript

var x = new (function() { this.hello = 'world'; })();
var o = { three: x };
var a = { one: 1, two: 2, obj: o };

// for HTML
$('pre').text( JSON.stringify(a) );

//for node.js, use this instead
//console.log( JSON.stringify(a) );