I was wondering how can I create a JSON (JS) object and then clone it.
Just do
var x = {} //some json object here var y = JSON.parse(JSON.stringify(x)); //new json object here