Search Smith

ColdFusion, SQL queries, and, of course, searching

Posts Tagged ‘linkedHashMap’

ColdFusion 9: Preserving sort order with structs

Posted by David Faber on January 28, 2012

In a previous post I talked about using structs to avoid using CFQUERY inside a query loop. Structs are also useful if you need to return your data in JSON format (of course, ColdFusion can return query objects in JSON format as well, but I think this format can be difficult to use if you’re using something other than ColdFusion to read it back in). In this vein, it would be helpful if structs retained sort order. This helpful blog post shows how to do just that.

Posted in ColdFusion | Tagged: , , , | Leave a Comment »