Skip to content

Instantly share code, notes, and snippets.

@jam01
Last active May 25, 2017 16:00
Show Gist options
  • Save jam01/4ae0f361bb577e9459e8b67c1c7544aa to your computer and use it in GitHub Desktop.
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.
%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