X
OR
X
$.ajax({ type: "GET", url: $SCRIPT_ROOT + "/airport/get/names/"+$("#airport_city").val(), contentType: "application/xml; charset=utf-8", success: function(url) { console.log(url['airports']); $('#airport_name').empty(); //var jsonObj = JSON.parse(url); //console.log(url['airports']); $.each(url['airports'], function(key, value) { $('#airport_name').append($('').attr('value', value).text(value)); }); }, error: function(jqXHR, textStatus, errorThrown) { } });