$.each(data, function(key, Citys) {
$("#" + exchange).append(
'<option value="' + Citys.CityID + '"' + (Citys.CityID == CityIDes[counter] && flag == true ? " selected='selected' " : " ") + '>' +
Citys.CityName +
'</option>');
if (Citys.CityID == CityIDes[counter]) {
flag = false;
CityIDes[counter].remove() // does not work
}
// }
});
i want to append cities to dropdown and select option when CityID equal to CityIdes in database.