I have a a file called recs.js
It contains many records like this (each on a new line):
A("TV1219|cent5 3t|10 Revolutions|Tim e For The Revolution|ince ntive|5|trance| 08/2003|3");
A("TV150|12txr0 04|2 digital|because of my dreams|triple xxx recordings|10|h ouse|zz/1999|2");
A("TV1007|12t iv-32|2 in a room|Ahora Es (Now Is The Time)|positiva| 5|house|zz/1995|5");
A("TV1271|12s bk 19|2 in a room|wiggle it|sbk records|7|oldsk ool|zz/1990|3");
A("TV513|nebdj0 59|4 strings|turn it around|nebula|5 |dance|zz/2004|2");
The field data are separated by the bar character (|)
The fieldnames are: product code, catnum, artist, title, label, price, genre, release, numtrax.
(A is a function which I call which loads the data into an array)
I need a function I can call which will sort by whichever column the user chooses i.e. title or label.
Any help greatly appreciated!
Trixy
It contains many records like this (each on a new line):
A("TV1219|cent5 3t|10 Revolutions|Tim e For The Revolution|ince ntive|5|trance| 08/2003|3");
A("TV150|12txr0 04|2 digital|because of my dreams|triple xxx recordings|10|h ouse|zz/1999|2");
A("TV1007|12t iv-32|2 in a room|Ahora Es (Now Is The Time)|positiva| 5|house|zz/1995|5");
A("TV1271|12s bk 19|2 in a room|wiggle it|sbk records|7|oldsk ool|zz/1990|3");
A("TV513|nebdj0 59|4 strings|turn it around|nebula|5 |dance|zz/2004|2");
The field data are separated by the bar character (|)
The fieldnames are: product code, catnum, artist, title, label, price, genre, release, numtrax.
(A is a function which I call which loads the data into an array)
I need a function I can call which will sort by whichever column the user chooses i.e. title or label.
Any help greatly appreciated!
Trixy
Comment