Create a gist now

Instantly share code, notes, and snippets.

anonymous /trycf-gist.cfm
Created Apr 29, 2017

What would you like to do?
TryCF Gist
<cfscript>
// fake a DB call
numbers = queryNew("id,en,mi", "integer,varchar,varchar", [
[1,"one","tahi"],
[2,"two","rua"],
[3,"three","toru"],
[4,"four","wha"]
]);
numbersAsArray = numbers.reduce(function(elements, row){
return elements.append(row);
}, []);
writeDump({
numbers=numbers,
numbersAsArray=numbersAsArray
});
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment