Reduce the height of the selected cesium entity to zero on mouse click in cesium

How do i need to reduce the height of the selected entity to zero on mouse click in cesium. Below is the code which i had tried

var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction(function(click){
    var pickedObject = viewer.scene.pick(click.position);
    if (Cesium.defined(pickedObject)) {
        var entityId = pickedObject.id._id;
        pickedObject.id._polygon._extrudedHeight._value = 0
    }    
},Cesium.ScreenSpaceEventType.LEFT_CLICK);

I’d avoid changing the private variables (which start with underscore). You should be able to do this with the public API. What happens when you do pickedObject.id.polygon.extrudedHeight = 0 ?