StructSort (base, sortType, sortOrder, pathToSubElement) DescriptionFinds and sorts structures that contain top-level key names. sortType can be numeric, text, or textnocase, and sortOrder can be asc (ascending) or desc (descending). Example<cfscript> Products = StructNew(); StructInsert(Products, "ProductName", "Blizzard Blender"); StructInsert(Products, "ProductName2", "Nukeit Microwave"); StructInsert(Products, "ProductName3", "Toastit Toaster"); </cfscript> <cfoutput> #ArraytoList(StructSort(Products, "Text", "Asc"))# </cfoutput> |