pranil2k2
6 years agoContributor
How to Pass Mapping Variables to Email Snap
Hi,
I am new to SnapLogic. i need help on how to pass the Mapping variable to Email snap. I need a requirement to read the mapping variable and need to refer in Email Snap Template body. so that us...
- 2 years ago
Hi Manzoor ,
Depending on your input data, if you have a flat object, you can make all of the NULL fields blank by using the following expression:
$.mapValues(val => val == null ? "" : val)
This will iterate over each value for each key in the input data and depending if the value is null, it will return an empty string otherwise it will return the original value.
Input data sample:
[ { "msg": "Hello, World", "num": 1, "field2": null } ]
Output:
[ { "msg": "Hello, World", "num": 1, "field2": "" } ]