Last active
September 30, 2017 19:51
-
-
Save Richardtugwell/f9fa664a4bd87aa84f3728ac3a3723d2 to your computer and use it in GitHub Desktop.
Lucee / ACF structFilter issue
This file contains 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> | |
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