remove empty properties from object javascript es6 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)), {})