Thanks for reading..
I have a file called recs.js
It contains many records like this (each on a new line):
A("TV1219|cent53t|10 Revolutions|Time For The Revolution|incentive|5|trance|08/2003|3");
A("TV150|12txr004|2 digital|because of my dreams|triple xxx recordings|10|house|zz/1999|2");
A("TV1007|12tiv-32|2 in a room|Ahora Es (Now Is The Time)|positiva|5|house|zz/1995|5");
A("TV1271|12sbk 19|2 in a room|wiggle it|sbk records|7|oldskool|zz/1990|3");
A("TV513|nebdj059|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
I have a file called recs.js
It contains many records like this (each on a new line):
A("TV1219|cent53t|10 Revolutions|Time For The Revolution|incentive|5|trance|08/2003|3");
A("TV150|12txr004|2 digital|because of my dreams|triple xxx recordings|10|house|zz/1999|2");
A("TV1007|12tiv-32|2 in a room|Ahora Es (Now Is The Time)|positiva|5|house|zz/1995|5");
A("TV1271|12sbk 19|2 in a room|wiggle it|sbk records|7|oldskool|zz/1990|3");
A("TV513|nebdj059|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