Forum Discussion
amardeep2021
4 years agoNew Contributor III
Thanks Cole. Kindly share the other expression also.
Regards,
Amar.
- cjhoward184 years agoEmployee
You can use this expression:
{ filterEmptyKeys: (value, key) => value != null, cleanupTree: value => value instanceof Object ? value.mapValues(this.cleanupTree).filter(this.filterEmptyKeys) : value }.cleanupTree($)
mapped to the target path
$
to remove all null values from a nested JSON object