get and set selected value
<p><strong>REFRASE QUESTION :</strong></p>

<p>I have 6 selects. When I select value from select1 I invoke some function from server side and I get JSON array from that function.</p>

<p>I get 5 values at most from this array, sometimes I'll get 20,30,40,50,60 but sometimes 20,30 or just 20.</p>

<p>These values correspond to select2, select3, select4, select5, select6 option value index. So in case the array returns 20,30,40,50,60 -> select2 option index value should be set to 20, select3 to 30 etc. And if array returns just 20 then select2 index value should be set to 20 and all others index values to 0.</p>

<p>What is the best way to do this? </p>

<p>Thank you</p>
