Javascript - arrays sorting
<p>I have two arrays:</p>

<pre><code>keys_array   = [2,4,5,8,9]
values_array = ['two','four','five','eight','nine']
</code></pre>

<p>I need to get:</p>

<pre><code>#transitional result
#values sorted alphabetically
sorted_by_value_name_array = [
  ['8','eight'],
  ['5','five'],
  ['4','four'],
  ['9','nine'],
  ['2','two']
]

#final result  
sorted_keys_array = [8,5,4,9,2]
</code></pre>

<p>How can i achieve this with javascript or jQuery?</p>
