Javascript how to sort an javascript array in parts?
<p>I have an (JS)array from a query on mij page, and it look like this:</p>

<pre><code>12349,1,1,1,12345,2,2,2,123457,3,3,3
</code></pre>

<p>The numbers with 5 digits are example "timestamps", the one digit are prices that belong to the timestamp. I want to sort the array based on the timestamps, but also want that the prices stay behind the timestamp. So after soring the array has to look like this:</p>

<pre><code>12345,2,2,2,12349,1,1,1,123457,3,3,3
</code></pre>

<p>How to do this?</p>
