DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
Delete object properties in JavaScript
for (var k in myObj) { if (k !== 'p1' && k !== 'p2' && k !== 'p100') { delete myObj[k]; } }
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#Delete
#object
#properties
#JavaScript
ADD COMMENT
Topic
COMMENT
Name
2+7 =
Submit