Home > ColdFusion > Complax Array Sorting in ColdFusion

Complax Array Sorting in ColdFusion

I needed to sort my cold fusion array which had complex Structure as CFC DTO in the array item.

I found very useful blog of Martin

Its very easy to implement. Actually I changed a little bit, I saved the UDF in a CFC and extended my main CFC to this new CFC and it worked straight away.

Here is the code how to call it.

sortArrayOfObjects(
arrayToSort = ,
sortKeys = [{'keyName':'yourKeyToSortOn'},{'sortOrder':'Ascending OR Descending'}],
doDuplicate = false,
useGetterMethods = false);

To download the code

Happy Coding

About these ads
Categories: ColdFusion Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 3,662 other followers

%d bloggers like this: