I have an object that I am trying to remove from a cssProperty that is being passed to an element. I have tried several things with no luck and am at a loss.
The object looks like
Object {background-color: "#91eae8"}
and I have tried removing it like
delete this.cssProps.background-color;
delete this.cssProps[background-color];
delete this.cssProps['background-color'];
neither has worked and throws viewModel errors because it doesn't know what I'm doing. I cannot change how the object comes in to have quotes around it or anything similar.
delete this.cssProps['background-color'];?removein js usedelete[...]throws viewModel errors[...]you should be more specific about the error that is thrown at the place where you do thedelete this.cssProps['background-color'];thisis what you think it is?var obj = { 'background-color' : '#91eae8' }; delete this.obj['background-color'];works just fine.