What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but that's non-standard and only supported by Firefox.I've done things like obj = JSON.parse(J
Say I create an object as follows:let myObject = {
"ircEvent": "PRIVMSG",
"method": "newURI",
"regex": "^http://.*",
};
How should I remove the property regex to end up with new myObject as