I understand how to sort an array with a single value but how can I
sort an array w multiple values : [ integer_value1, float_value2]
an_array = [ [123, 42.50], [ 245, 25.45], [389, 32.69] ]
wich should give (sorting on the 2nd value)
sorted_array => [[ 245, 25.45], [389, 32.69], [123, 42.50] ]
thanks for your help
joss
wich should give (sorting on the 2nd value)
sorted_array => [[ 245, 25.45], [389, 32.69], [123, 42.50] ]
would this help ?
http://dev.rubycentral.com/ref/ref_c_array.html#rassoc
best,
UG
Uma G.
On 2006-12-18 17:29:59 +0100, “Uma G.” [email protected] said:
Uma G.
http://umageller.wordpress.com
thanks … got it … so many things to think…
joos