Created
May 25, 2017 14:43
-
-
Save jam01/ad2c3770da96569d86ce78d34c597387 to your computer and use it in GitHub Desktop.
This script will filter out all null and empty fields except the ones you specify. Useful where for some reason some xml fields have null values but relevant info in the attributes.
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/xml | |
--- | |
{ | |
result: payload filter ($ != null and $ != '' or $$ == 'someSpecificField') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment