Remove a JSON attribute
The selected answer would work for as long as you know the key itself that you want to delete but if it should be truly dynamic you would need to use the [] notation instead of the dot notation. For example: var keyToDelete = "key1"; var myObj = {"test": {"key1": "value", "key2": "value"}} //that will not work.
https://stackoverflow.com/questions/1219630/remove-a-json-attribute