based on a selectizeInput update another PickerInput

...Hello there!
I have a sidebar menu items which works for all the tabs created. I have a Selectize Input created. Based on the inputs in any of the menuItems, I want to update the seletizeInput with the appropriate options. For eg, in the sidebar I have , A,B,C,D and as the other selectize Input has the country names as a selection. If any of the A,B,C,D values are selected, then I want the countries to show only the relevant options, let's say if A is selected and from A drop down list x,y are selected then the countries should show only Japan, India and Ntherlands, similarly to all. And the data source is from two different sources for A,B,C,D is from one and does not have the country column, I have another data source which has country column and A,B,C,D columns. Any assistance will be of great help...

Essentially, you want to do the following:

Set up a reactive value to hold the choices of the pickerInput as a vector.
ObserveEvent on the selectizeInput such that based on the value of it, change the reactive value.
The pickerInput will automatically adjust to the new choices.

Any code snippets will be appreciated as i am a newbee