How to access items of dropdown

How to access items of dropdown

hi
Suppose i have  2 dropdown a and b

i want to hide or show items of dropdown_b on the basis of the items selected in dropdown_a.

so for this purpose

if (input.dropdown_a == 'a1')
{

    //  hide b1 and b2 of dropdown b , lets say dropdown b contain b1,2,3,4 
}

please provide me the syntex for accessing item i.e. b1 , b2 of dropdown b

Thanks and Regards