If the key is a first-level key (meaning you're not trying to sort by a key
in a sub-structure), you can create a list of the structure's keys with 

StructKeyArray(mystruct)

And then sort the array

And then loop over the array, break out the keyname at myarray(i) and access
the structure value at that key as normal

There is a function structsort() in 4.5... however I have never been able to
get it to work.  The documentation is incomplete and hard to find... the
error messages help... but not enough for me to be able to tell you how to
use the function.

|-----Original Message-----
|From: Robert Everland [mailto:[EMAIL PROTECTED]]
|Sent: Thursday, March 29, 2001 1:53 PM
|To: CF-Talk
|Subject: Sort Structures
|
|
|       How can I sory a struture by a key I have.
|
|Robert Everland III
|Web Developer
|Dixon Ticonderoga
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to