Remove attributes with null values from a cdt

Hi, 

I have a requirement to remove attributes with null values from a cdt, so that downstream system can consume it properly. 

Given: {a:null, b: 10, c: "", d: 20}

Expected: {b: 10, d: 20}

Please let me know if there is an easy way to do this. 

  Discussion posts and replies are publicly visible