title: Change key in js associative array
body: <p>If I have:</p>
  
  <pre><code>var myArray = new Array();
  
  myArray['hello'] = value;
  </code></pre>
  
  <p>How can I change the key 'hello' to something else?</p>
  
  <p>Something like this would work.</p>
  
  <pre><code>var from = 'hello',
      to   = 'world',
      i, value = myArray[from];
  
  for( i in myArray )
    if( i == from ) myArray.splice( i, 1 );
  
  myArray[to] = value;
  </code></pre>
  
  <p>But is there a native function or a better way to do it?</p>
  
  <p><strong>edit:</strong></p>
  
  <p>Due to the lack of associative arrays in js, what I want to do modify the property name of an object as efficiently as possible.</p>