I\'m getting JSON back in this format from my C# webmethod:
{\"d\":[\"ADAMS CITY\",\"BOULDER\",\"ANTON\",\"ARBOLES\"]}
I now have a asp.net
Here's something that should do fine inside of your success
callback:
var $select = $("#parkcity");
$.each(data.d, function(i, el) {
console.log(el);
$select.append($("", { text: el }));
});
Example: http://jsfiddle.net/z2D8f/
Or an alternative that appends the HTML all at once, which is probably faster:
var html = $.map(data.d, function(el) {
return "";
});
$("#parkcity").append(html.join(''));
Example: http://jsfiddle.net/pUhw2/