Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

delete empty values from object js

Object.keys(obj).forEach((k) => (obj[k] === null || obj[k] === undefined) && delete obj[k]);
 
PREVIOUS NEXT
Tagged: #delete #empty #values #object #js
ADD COMMENT
Topic
Name
9+6 =