Created
July 15, 2025 10:36
-
-
Save trycf/29d51928e2da5469117ba7924ab75be5 to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
a = { | |
"middle": 5, | |
"last": 10, | |
"first": 1 | |
}; | |
x = structSort(a, 'numeric', 'asc'); | |
writeDump( x ); | |
/* | |
expect : [ 'first', 'middle', 'last' ] | |
boxlang : [ 'first', 'last', 'middle' ] | |
*/ | |
a = { | |
20: 5, | |
10: 10, | |
30: 1 | |
}; | |
x = structSort(a, 'numeric', 'asc'); | |
writeDump( x ); | |
/* | |
expect : [ '30', '20', '10' ] | |
boxlang : [ '10', '20', '30' ] | |
*/ | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment