javascript delimited column sort

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

trix1210

Thread Starter
Joined
Sep 27, 2008
Messages
8
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
 

IMM

Joined
Feb 1, 2002
Messages
3,257
Are you trying this with a 1 dimensional array or have you loaded it into a 2D array ?
 

IMM

Joined
Feb 1, 2002
Messages
3,257
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top