structKeyArray()

The Lucee documentation states the following for structKeyArray():

For unsorted structs, Adobe returns a text sorted Array of keys, for performance reasons, Lucee simply returns the raw sort order

This statement is NOT correct.

Using the built-in cftry portion of the Lucee Docs

Shows that the returned array is indeed, sorted.

(Lucee 4.5, 5.4 and 6 - all return a sorted array.)

Either the documentation is wrong - or Lucee does not correctly implement its own spec.

2 Likes

Maybe some insights
https://luceeserver.atlassian.net/browse/LDEV-4725

1 Like

[deleted]

Indeed, and adding to the confusion in that doc page is the term “unsorted structs”, which should be “unordered structs”.