Created
September 12, 2019 22:56
-
-
Save trycf/e3357ea85645f7073c744d56fc92a6a3 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> | |
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