title: JavaScript - 'Normalize' array indexes
body: <p>I am looking for a method to 'Normalize' array indexes in Javascript.
  I have a large array ( <code>_spm</code> ) containing values with numeric indexes like ( <code>_spm[201023]</code> ).</p>
  
  <p>( For You, to understand: Re-indexing the array starting from zero. )</p>
  
  <p>I would need a method to make all the records have a more human-friendly index ( and may also be sorted ). </p>
  
  <p>I mean:</p>
  
  <pre><code>function normalize( arrayWithMessedUpIndexes ){ return reIndexedAndOrderedArray }
  </code></pre>
  
  <p>A possible input is the array <code>_spm</code> considering that:</p>
  
  <pre><code> _spm[201023] = "s";
   _spm[376615] = "m";
  </code></pre>
  
  <p>A possible output of the method I am looking for ( using the input array above ):</p>
  
  <pre><code> _spm[0] = "s"
   _spm[1] = "m"
  </code></pre>