1 for (var key in data) { 2 $("#selc1").append("<option value='" + key + "'>" + data[key] + "</option>"); 3 } 4 5 6 $.each(data, function (i, item) { 7 $("#selc1").append("<option value='" + item.key + "'>" + item.value + "</option>"); 8 });
1 for (var key in data) { 2 $("#selc1").append("<option value='" + key + "'>" + data[key] + "</option>"); 3 } 4 5 6 $.each(data, function (i, item) { 7 $("#selc1").append("<option value='" + item.key + "'>" + item.value + "</option>"); 8 });