Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery clone object

// Shallow copy
var newObject = jQuery.extend({}, oldObject);

// Deep copy
var newObject = jQuery.extend(true, {}, oldObject);
Source by api.jquery.com #
 
PREVIOUS NEXT
Tagged: #jquery #clone #object
ADD COMMENT
Topic
Name
9+6 =