title: updating javascript object key value
body: <p>If i try to add more keys with values to a javascript object it alters the value of all keys, not just the one I have added.</p>
  
  <pre><code>var corridorObject = {};
  var makeObjects = [];
  function someFunction(){
      var a = makePoints;
      var Corridor = viewer.entities.add({
          corridor : {
              positions : (a),
              width : 10.0,
              material : Cesium.Color.GREEN,
          }
          var idv0 = Corridor.id
          corridorObject[idv0] = makeObjects;
          console.log(corridorObject);
          makeObjects.length=0;
      }
  </code></pre>
  
  <p>The Corridor ID is a guid, the makeObjects an array of objects, when I run this it adds the key perfectly, and the values, but when I run it a second time it adds a new key with the new ID and new values, but it also changes the values for all the other keys to the most recent values.</p>
  
  <p>here is the console, as you can see the first time the array for the ID is 3 long the second time with the same id its 2 long</p>
  
  <pre><code>Object {91ff9967-7019-4e76-846e-c0e125481060: Array[3]}
  Object {91ff9967-7019-4e76-846e-c0e125481060: Array[2], 3de2c2b1-5fb6-495c-9034-2b37713e5c30: Array[2]}
  </code></pre>
  
  <p>Sorry to be more clear, this is from Cesiumjs, its taking points and converting them to a corridor, the corridor id and an array of the points that made it are then added to this object. The array of points is then emptied.</p>