3

I have a very nested structure with sensitive data (SSN, passwords and so on). Is there a simple way of making all of those ---- so the content is hidden?

afelisatti
  • 2,770
  • 1
  • 13
  • 21

2 Answers2

3

It seems the mask function is the easiest way:

%dw 2.0
import * from dw::util::Values
output application/xml
---
(payload mask "ssn" with "----") mask "password" with "----"
afelisatti
  • 2,770
  • 1
  • 13
  • 21
1

Update function? Otherwise a recursive function (something on the lines of what has been documented here. https://help.mulesoft.com/s/article/Replace-or-mask-the-value-of-a-xml-element-and-attribute-using-data-weave-2-0 )

Salim Khan
  • 4,233
  • 11
  • 15