title: JavaScript : Deep Copy and Clear Object
body: <p>Just sharing a piece of code that can be useful if you are in the same case as me. Be Careful when your object contains functions they will also be cleared (in my case I don't have any function so I haven't really managed the case)!</p>
  
  <p>In my case I need to (deep)copy a JSON Object to create many internationalization documents (MongoDB) in a database (for each language, ~15). The translators will be able to fill the new-empty JSON and then I'll be able to compute the progress to know if the translation is done at 100%.</p>
  
  <p>I'm posting the code here to know if you have a better solution (it's a production code and a really important part of the application) in ES6-7 or a different approach to deep copy and clear in the same time.</p>