Sorting a List of Lists
Sorting a List of Lists
- Subject: Sorting a List of Lists
- From: Marconi <email@hidden>
- Date: Sat, 27 Apr 2013 14:49:31 -0700
I have a list of lists with two items in each list.
{"2013-04-01", "some text here"}
{"2010-07-11", "some other text here"}
{"2012-12-22", "some different here"}
and so on. That is, my list of lists might be:
{{"2013-04-01", "some text here"},{"2012-07-11", "some other text here"},{"2010-12-22", "some different here"}}
Most of these lists of lists will be in the range of 100-200 item pairs in each list.
I need to sort these on the first datum so that the above list would come out:
{"2010-07-11", "some other text here"}
{"2012-12-22", "some different here"}
{"2013-04-01", "some text here"}
I tried a generic bubble sort but get the error:
Can't make {"2013-04-01", "some text here"} into type number, date or text.
Treating "2013-04-01" as ASCII would be fine with me, though I suspect it's treating the dates as type number.
What to do?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden