I have a simple list respone that i want put to td for each have id
my problem is why my response object not set to td when success.
Thanks
public async Task<JsonResult> GetIndividualWellByName(string uwi)
{
var wt = await _iwelltest.GetPPDMWellTestByName(uwi);
return Json(new { data = wt.ToList() });
}
<table class="table table-vcenter card-table">
<thead class="table-success" style="background: white;">
<tr>
<th style="font-size: 80%; font-weight: 700;">Well Name</th>
<th style="font-size: 80%; font-weight: 700;">Test Type</th>
<th style="font-size: 80%; font-weight: 700;">Test Date</th>
<th style="font-size: 80%; font-weight: 700;">Water (STB)</th>
<th style="font-size: 80%; font-weight: 700;">Oil (STB)</th>
<th style="font-size: 80%; font-weight: 700;">Gas (MSCF)</th>
</tr>
</thead>
<tr>
<td id="_PLOT_NAME"></td>
<td id="_TEST_TYPE"></td>
<td id="_TEST_DATE"></td>
<td id="_WATER_FLOW_AMOUNT"></td>
<td id="_OIL_FLOW_AMOUNT"></td>
<td id="_GAS_FLOW_AMOUNT"></td>
</tr>
</table>
function getwelltest(string uwi) {
$.ajax({
type: 'GET',
url: '/Home/GetIndividualWellByName',
data: { uwi: uwi },
contentType: 'application/json; charset=utf-8',
datatype: 'json',
success: function (data) {
if (data !== null) {
$.each(data, function (i, obj) {
$("#_PLOT_NAME").text(obj.PLOT_NAME);
$("#_PLOT_NAME").text(obj.TEST_TYPE);
$("#_PLOT_NAME").text(obj.WATER_FLOW_AMOUNT);
$("#_PLOT_NAME").text(obj.OIL_FLOW_AMOUNT);
});
}
else {
return null;
}
},
error: function (err) {
//alert(err);
}
});
}