Also, if you don't have 4.5.1 SP2, you can use 2 arrays. The first array has Col1, the second array has col2. You can then write your own simple sort on col2, and whenever you swap two elements, do a simular swap in col1. It's not super fast, but not super slow either. ======================================================================= Raymond Camden, Principal Spectra Compliance Engineer for Allaire Email : jedimaster at allaire.com ICQ UIN : 3679482 "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: thelist-admin at lists.evolt.org > [mailto:thelist-admin at lists.evolt.org]On Behalf Of Michael Buffington > Sent: Tuesday, November 28, 2000 4:25 PM > To: thelist at lists.evolt.org > Subject: [thelist] Sorting 2D Array in ColdFusion > > > I need to sort values in a 2D ColdFusion array. > > By itself, this is a simple task, but it get's tricky. I'm > converting a text > file that looks like this... > > 2303,3 > 2390,1 > 2302,2 > > ...into a 2D array that looks like this: > col1 col2 > 2303 3 > 2390 1 > 2302 2 > > My intent is to sort the values to look like this: > col1 col2 > 2390 1 > 2302 2 > 2303 3 > > I cannot use ArraySort(myArray) because that will only sort col2. > > Any ideas? > > I may have to back track a good distance and loosen my dependence on this > data structure, but I can't think of an alternative just yet. > > Michael Buffington > mike at price.com > (714) 556-3890 x222 > http://www.price.com > http://www.michaelbuffington.com > > --------------------------------------- > For unsubscribe and other options, including > the Tip Harvester and archive of TheList go to: > http://lists.evolt.org Workers of the Web, evolt !