Last active
May 25, 2017 16:00
-
-
Save jam01/4ae0f361bb577e9459e8b67c1c7544aa to your computer and use it in GitHub Desktop.
Dataweave script that let's you dynamically use a field selector to select another field. Using squared brackets insteaf of dots allows you to select the field dynamically.
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
%dw 1.0 | |
%output application/json | |
--- | |
{ | |
result: payload[payload.someField] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment