Created
May 30, 2017 09:14
-
-
Save dsaiztc/462bbc8a3a0f97e29158122bbebce23d to your computer and use it in GitHub Desktop.
Extend object
https://stackoverflow.com/a/122704/3149679
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shallow copy | |
var newObject = jQuery.extend({}, oldObject); | |
// Deep copy | |
var newObject = jQuery.extend(true, {}, oldObject); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment