Removes value associated with an element by given key. If key is not provided, removes all the data of the element.
Returns: objectElement