SyntaxFix
Write A Post
Hire A Developer
Questions
this solved my issue, it was working fine with
var value = item[index].id; $("#select2").val(value);
but not showing selected value, so
$("#select2").val(value).change();
works fine for me.