I have a simple list json response that i want to populate in dropdown but as a column table
My problem is why is the dropdown isn't populate data response ajax as table column
Thank You
@Html.DropDownListFor(model => model.UID, new SelectList(ViewBag.WellCore, "UID", "UID"), "Select", new { @class = "form-control", @style = "width:250px;font-size:12px", @id = "_COREIDANALYSIS", required = "required" })
var jsonData = '[{"rank":"9","content":"Alon","UID":"5"},{"rank":"6","content":"Tala","UID":"6"}]';
$.ajax({
url: '/echo/json/',
type: 'POST',
data: {
json: jsonData
},
success: function (response) {
var trHTML = '';
$.each(response, function (i, item) {
trHTML += '<tr><td>' + item.rank + '</td><td>' + item.content + '</td><td>' + item.UID + '</td></tr>';
});
$('#_COREIDANALYSIS').append('<option value="' + item.UID + '">' + trHTML + '</option>');
}
});
For EX my Goal just like this :
https://ibb.co.com/hs0cmtF