Sets the property on an object.