Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/17ab3b32df8d19133545827fd8a03092 to your computer and use it in GitHub Desktop.
Save trycf/17ab3b32df8d19133545827fd8a03092 to your computer and use it in GitHub Desktop.
TryCF Gist
<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