How to get the assigned values to each option?