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/e3357ea85645f7073c744d56fc92a6a3 to your computer and use it in GitHub Desktop.
Save trycf/e3357ea85645f7073c744d56fc92a6a3 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
writeDump(people);
arrayOfPeople = people
.filter((person)=>person.country=='China')
.reduce((results,row)=>{
results.append({
"id":row.id,
"fullName": row.firstName & " " & row.lastName,
"email": row.email
});
return results;
},[]);
writeDump(arrayOfPeople);
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment