Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18714
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | "Tony" <tony.johansson@inport.com> |
| Newsgroups | comp.lang.javascript |
| Subject | sort array |
| Date | Mon, 4 Mar 2013 18:33:57 +0100 |
| Organization | A noiseless patient Spider |
| Lines | 1 |
| Message-ID | <kh2lrk$ena$1@dont-email.me> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; format=flowed; charset="iso-8859-1"; reply-type=original |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Mon, 4 Mar 2013 17:32:36 +0000 (UTC) |
| Injection-Info | mx05.eternal-september.org; posting-host="04290fff4557273ca84c3ad616751e0b"; logging-data="15082"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CIJeEgRPaSTmKaH8xr/wDrt4S2ODhS6E=" |
| X-MimeOLE | Produced By Microsoft MimeOLE V15.4.3555.308 |
| X-Newsreader | Microsoft Windows Live Mail 15.4.3555.308 |
| Importance | Normal |
| Cancel-Lock | sha1:HAOTjxlbLrVS6fv4lEv5Y2StMpM= |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| Xref | csiph.com comp.lang.javascript:18714 |
Show key headers only | View raw
I have an array called tempArray that consist of these fields
VesselID, ETATime, Gotref, Point
When I want to sort on VesselID I use which works good
tempArray.sort(function (a, b)
{
return a.VesselID - b.VesselID
})
Now I still want to sort on VesselID but within VesselID I also want to sort
on ETATime
ETATime which is of format YYYY/MM/DD hh:mm:ss
How can I do that ?
//Tony
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
sort array "Tony" <tony.johansson@inport.com> - 2013-03-04 18:33 +0100
Re: sort array "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-03-04 19:19 +0100
Re: sort array "J.R." <groups_jr-1@yahoo.com.br> - 2013-03-05 00:07 -0300
Re: sort array Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-05 17:51 +0100
Re: sort array "Joao Rodrigues (J.R.)" <groups_jr-1@yahoo.com.br> - 2013-03-09 02:33 -0300
Re: sort array Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-09 13:01 +0100
Re: sort array Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-03-05 21:10 +0000
csiph-web