Created
June 14, 2022 04:37
-
-
Save trycf/17ab3b32df8d19133545827fd8a03092 to your computer and use it in GitHub Desktop.
TryCF Gist
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> | |
data = {}; | |
data['counts'] = { | |
'accounts': 0, | |
'cources': 3475 | |
}; | |
dump(label: "data", var: data); | |
stHasCounts = StructReduce(data.counts, function(result, key, value) { | |
if (value > 0) { | |
result[key] = value; | |
} | |
return result; | |
}, {}) ; | |
dump(label: "stHasCounts", var: stHasCounts); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment