If I have an object:
var myobj={name: 'Some Value',
id: 'my id',
address: 'my address'
...}
myobj has been extended dynamically, by myobj[custom_attribute]=SOME_VALUE
I would like to clean up this object to have empty attribute, that’s myobj={}, how to do it? (I do not want to use for loop to clean up the attribute one by one)
so you want to assign myobj={}, to make it empty? Pardon me if I read your question wrong, but it seems to me you want to do