Im trying to get a simple json on my ajax to asign the values to some inputs on my page, but i always get a undefined on my ajax alert
This is my JSON:
{"data":[{"Line_Number":10,"PO_Number":"P072592-1","Date":"9-07-17","Item_Number":"12789 - ","Size":"S","Description":"HDW- HINGE- PIANO- BLACK STAINLESS- .125 DIA.- HD SERIES","Delivery":"12-18-17","Quantity":800.0000,"Unit":"PCS","Unit_Price":0.8600,"Amount":"688"}]}
And this is my Ajax Call:
$.ajax({
type: "GET",
dataType: "json",
url: '@Url.Action("GetOrder","Orders")/' + val,
//data: { po_number: 'value' },
success: function (data) {
alert(data[0].Date)
},
error: function () {
alert('Some error occurred!');
}
});
However i always get a Undefined on my alert and what i need is my "Date" Value What am i doing wrong?