var selectedCity = [{ cityid:"1" }, { cityid:"3" }]
HTML:
City:<select name="city" multiple>
<option value="1">Bombay</option>
<option value="2">Chennai</option>
<option value="3">Bangalore</option>
<option value="4">Calcutta</option>
<option value="5">Delhi</option>
</select>
I have an array object ie selectedCity with the selected city values .
Now how to set these array values as selected in the dropdown list using jquery each function such that it has Bombay(1) and Bangalore(3) as selected in dropdown list box