title: Javascript new Map return reference of the object?
body: <p>I have a javascript Map</p>
  
  <pre><code>var map1 = new Map();
  map1.set('bar',{"foo":"baz"});
  var obj = map1.get('bar')
  </code></pre>
  
  <p>When I change the value of obj the map value also changed</p>
  
  <pre><code>obj.foo = "abc"
  console.log(map1.get("bar")) //{"foo":"abc"}
  </code></pre>
  
  <p>Why is that? and how to stop this behavior?
  I know we can use the <code>Object.assign()</code> to unlink the reference, but I need to do every time when I get from Map then. Is there any alternative solution of the best way to do it?</p>