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
Categories: ColdFusion
ColdFusion
Comments (0)
Trackbacks (0)
Leave a comment
Trackback