Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to duplicate a tree? #25

Open
burakkilic opened this issue Feb 6, 2016 · 2 comments
Open

Possibility to duplicate a tree? #25

burakkilic opened this issue Feb 6, 2016 · 2 comments

Comments

@burakkilic
Copy link

Hi;

How can I duplicate a tree? Should I Iterate over the tree? Or any suggestions?

Thanks

@janez89
Copy link
Owner

janez89 commented Feb 6, 2016

Hello,
A possible solution the JSON stringify / parse methods combination.

var object2 = JSON.parse(JSON.stringify(object));

@burakkilic
Copy link
Author

But to save the instance, we should remove the _id fields right? I think it won't be easy without iteration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants