How to delete an object's properties