Read this question: How do I remove a property from a JavaScript object?
However my code uses 'use strict';
in global declaration which means it is present in the whole file.
delete
statement is forbidden in strict mode (has no effect). Documentation
How can one delete properties from objects when using strict mode without having to resort to cloning and looping over properties, skipping the one that is to be deleted?
Update and clarification:
I need to delete a property from an object before sending it to the server, which complains for unknown properties.