sorting - Coldfusion 8: Array of structs to struct of structs -


itemprop = "text">

I have an array item [] Each item in the item [] is a straight item's keys ID, date, value ( I.e., item.id, item, data, item.file)

I want to use StrontSearch to organize an item archive from a date

Is it ColdFusion 8 The best way to do this is:

  & lt; Cfset allStructs = StructNew () & gt; & Lt; Cfloop array = # item # index = "item" & gt; & Lt; Cfset allStructs [item.id] = items & gt; & Lt; Cfset unixtime = DateDiff ("S", CreateDate (1970,1,1), item.date) & gt; & Lt; Cfset all strouts [item.id] .ininstem = unsetm & gt; & Lt; / Cfloop & gt; & Lt; Cfset allStructs = StructSort (All strokes, "numerical", "desc", "unixtime") & gt;  

This is going to be a terrible slow motion

You will also need to change in Unixtime, but can be faster at least, you can compare two options.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -