Ordenate a Array

I have a array/object created like this:

’ data={ lat : aVeiculos.dispositivos[0].posicoes[0].latitude , _
’ lon : aVeiculos.dispositivos[0].posicoes[0].longitude , _
’ placa : aVeiculos.placa , _
’ cor : aVeiculos.cor , _
’ endereco : aVeiculos.dispositivos[0].posicoes[0].endereco , _
’ info : cCarroSelecionado , _
’ distancia: cDistancia , _
’ km : nDistancia , _
’ isPerto : False , _
’ icone : encodeURI(“http://fastmobile.info/img/bus.png”) , _
’ espera : txtEspera , _
’ tempo : cTempo _
’ }
’ aAllBus.push(data)

after the fill with elements it´s possible order it by the element km ?

Thanks in advance !

I found a answer, a cool answer :slight_smile:

It works so fine !

There is also this function:

http://wiki.nsbasic.com/Sort

George Henne
NS BASIC Corporation
http://www.nsbasic.com

Sort , how I saw on the docs , don´t do on multidimensional arrays !

Thank you !

RICARDO CASSOLATTO

Business Consultant
sintetik@gmail.com / 21 98196-0504

FastMobile
http://fastmobile.info
http://www.facebook.com/ricardo.cassolatto
https://br.linkedin.com/in/ricardo-cassolato-9ba225

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.