Forum Discussion
tstack
9 years agoFormer Employee
The Mapper can delete fields based on a JSON-Path and you can do quite a bit with JSON-Path. If you wanted to delete fields whose values were null, you could add a Mapper, set “Pass through” to true, and add one row with this expression:
$…[?(value == null)]
Note that there is nothing in the ‘Target Path’ column for this row.
Here’s a breakdown of the JSON-Path:
$… - This tells the mapper to walk the entire JSON object hierarchy.
[?(value == null)] - This is a conditional that tells the mapper to visit only those fields whose value is null.
msager
9 years agoEmployee
Excellent, Thanks Tim!