Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

es6 remove empty property from object

Object.entries(obj).reduce((a,[k,v]) => (v == null ? a : (a[k]=v, a)), {})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #empty #property #object
ADD COMMENT
Topic
Name
8+1 =