title: Javascript change place of array element
body: <p>I have nested array in javascript like this:</p>
  
  <pre><code>testArray['element1'] = {par1: "value1", par2: "value2" ... }
  testArray['element2'] = {par1: "value1", par2: "value2" ... }
  testArray['element3'] = {par1: "value1", par2: "value2" ... }
  testArray['element4'] = {par1: "value1", par2: "value2" ... }
  </code></pre>
  
  <p>so how can I change place of element? for example instead of </p>
  
  <pre><code>("element1", "element2", "element3","element4")
  to be
  ("element4", "element2", "element3","element1")
  or
  ("element1", "element4", "element3","element2")
  </code></pre>