DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
9+9 =
Submit