The first google result has a good example. See
How to create dropdown list dynamically using jQuery? - Stack Overflow[
^]
var data = {
'foo': 'bar',
'foo2': 'baz'
}
var s = $('<select />');
for(var val in data) {
$('<option />', {value: val, text: data[val]}).appendTo(s);
}
s.appendTo('body');
In this case, data may be coming from a webservice call using jQuery's .ajax() method.