remove empty properties object javascript code example
Example: es6 remove empty property from object
Object.entries(obj).reduce((a,[k,v]) => (v == null ? a : (a[k]=v, a)), {})
Object.entries(obj).reduce((a,[k,v]) => (v == null ? a : (a[k]=v, a)), {})