JavaScript - How to remove a property from an object
Posted: 14 Jan 2015, 08:42
I have an object like this in javascript:
What is the best way to remove the property "prop2" to end up with this new object:
Code: Select all
var obj = {
prop1: 'val 1',
prop2: 'val 2',
prop3: 'val 3'
};
Code: Select all
var obj = {
prop1: 'val 1',
prop3: 'val 3'
}