1//add option to select with jQuery
2$('#selectID').append($('<option>', {
3 value: 1,
4 text: 'Option Text'
5}));
1$.each(items, function (i, item) {
2 $('#mySelect').append($('<option>', {
3 value: item.value,
4 text : item.text
5 }));
6});
1Here , object contains the list of values
2
3$.each(obj , function (key, value) {
4 $('#GroupName').append($('<option>',
5 {
6 value: value.id,
7 text: value.Group_Name
8 }));
9