Last active
September 10, 2015 22:41
-
-
Save christierney402/0bbb4701094677c4aa74 to your computer and use it in GitHub Desktop.
ColdFusion 10+ Query to Array of Stucts
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
// convert a query to an array of structs | |
// credit: http://www.bennadel.com/blog/2367-coldfusion-10---looping-over-queries-using-a-for-in-loop-in-cfscript.htm | |
function queryToArray( required query query ){ | |
var queryAsArray = []; | |
for (var row in query){ | |
arrayAppend( queryAsArray, row ); | |
} | |
return(queryAsArray); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment