Gosh it would be elegant if this worked, but the closure function doesn’t have access to the global scope like a normal closure does
an_array = [];
a_query.each(function(row){
an_array.append(row);
});
Gosh it would be elegant if this worked, but the closure function doesn’t have access to the global scope like a normal closure does
an_array = [];
a_query.each(function(row){
an_array.append(row);
});
What version of Lucee are you using? That approach does work.
You can run an example here: TryCF.com
You could also return an array of structs from the original query execution. See: queryExecute Code Examples and CFML Documentation
Doh. Brain fart on my part. Thanks for the sanity check