Created
May 1, 2019 21:31
-
-
Save dlwhitehurst/25139a295ba8010d21cc26a5c4c2d91a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
%dw 1.0 | |
%output application/json | |
%var idToFieldName = { | |
"5324": "firstName", | |
"5325": "lastName", | |
... | |
} | |
--- | |
payload.elements[0].fieldValues reduce (field, entity={}) -> | |
entity ++ { (idToFieldName[field.id]): field.value } | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment