Hi,
To whom so ever it may concern,
I am using API to fetch the data into my form using jquery, I am getting response as list in below mentioned way
- list:Array(1)
- 0:
- due:null
- originalAmount:463872
- outstandingAmount:463872
- taxperiod:
- from:"2017-01-01"
- to:"2017-02-01"
- __proto__:Object
- type:"VAT Return Debit Charge"
while I am trying to fetch this list in below mentioned way
success(function (data) {
debugger;
if (data != null) {
if (data.status == 'Ok') {
//var xmlDoc = $.parseXML(data.d);
//var xml = $(xmlDoc);
//var customers = xml.find("Table");
//var rows = '';
for (var i = 0; i < data.list.length > 0; i++) {
debugger;
$scope.due = data.list[i].due == null ? '' : data.list[i].due;
$scope.originalAmount = data.list[i].originalAmount == null ? 0.00 : data.list[i].originalAmount;
$scope.outstandingAmount = data.list[i].outstandingAmount == null ? 0.00 : data.list[i].outstandingAmount;
$scope.paidAmount = (Number(data.list[i].originalAmount) - Number(data.list[i].outstandingAmount)) == null ? 0.00 : Number(data.list[i].originalAmount) - Number(data.list[i].outstandingAmount);
$scope.formtype = data.list[i].type == null ? '' : data.list[i].type;
}
}
}
but unable to get inside the for loop
here it may increase the count. I want to bind this data to html table, can anyone explain me how to acheive this, by this my project got stuck up, basing on this I need to pass the data to next page. This has to be done in jquery only
Thanks for the help in advance