In every programming language sometimes there is a need to have an exact copy of on object. Copy that will be a faithful reflection of the base object, with all attributes and fields at every nesting level.
2. Using JSON stringify function
3. Using lodash deep clone method
4. For Angular framework use angular.copy function
5. Using jQuery extend function
6. Using Object.assign
7. Performance comparision
Now lets check the performance comparision.
If you want to check this benchmark by yourself, click this link: http://jsben.ch/bWfk9