Skip to content

Instantly share code, notes, and snippets.

@Richardtugwell
Last active September 30, 2017 19:51
Show Gist options
  • Save Richardtugwell/f9fa664a4bd87aa84f3728ac3a3723d2 to your computer and use it in GitHub Desktop.
Save Richardtugwell/f9fa664a4bd87aa84f3728ac3a3723d2 to your computer and use it in GitHub Desktop.
Lucee / ACF structFilter issue
<cfscript>
foo = 2;
bar = 3;
function test( required any foo , required any bar ) {
return arguments;
};
args = test( foo , bar );
/* crude fix for Lucee
args = deserializeJSON(serializeJSon(test( foo , bar )));
*/
writedump(args);
try {
filtered = structFilter( args , function(key,value) { if (value eq 3) {return true;} else {return false;} } );
writedump(filtered);
} catch( any e ) { writeDump(e) };
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment