Deep clone object via Json - Node.js Object

Node.js examples for Object:Clone

Description

Deep clone object via Json

Demo Code


Object.prototype.deep_clone = function(){
  eval("var tmp = " + this.toJSON());
  return tmp;//from   www .j ava2 s. c om
}

Related Tutorials