Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- /* type : "POST", */
- url : "launchapptest",
- /* contentType: "application/json; charset=utf-8", */
- data : "processDateInput="+processDate,
- dataType : "json",
- async: true,
- success : function(result) {
- var od = JSON.stringify(result) ;
- var obj = JSON.parse(od);
- console.log(obj.od);
- console.log(obj.od.percentageCompleted);
- console.log(od);
- $.each(JSON.parse(od), function(idx, obj) {
- console.log(obj.tagName);
- });
- }
- });
- {
- "od": [
- {
- "dateProcessed": [
- "09/11/2014",
- "10/11/2014",
- "11/11/2014",
- "12/11/2014"
- ],
- "percentageCompleted": 25,
- "processRunning": 0,
- "remainingTime": 0,
- "successBatchCount": 0,
- "totalBatchCount": 0
- }
- ],
- "processDateInput": "12/11/2014"
- }
- $.ajax({
- /* type : "POST", */
- url: "launchapptest",
- /* contentType: "application/json; charset=utf-8", */
- data: "processDateInput=" + processDate,
- dataType: "json",
- async: true,
- success: function (result) {
- var od = JSON.stringify(result);
- var obj = JSON.parse(od);
- $.each(obj, function (index, value) {
- console.log(obj[index][0].percentageCompleted);
- console.log(obj[index][0].processRunning);
- console.log(obj[index][0].remainingTime);
- console.log(obj[index][0].successBatchCount);
- console.log(obj[index][0].totalBatchCount);
- console.log(obj.processDateInput);
- $.each(obj[index][0].dateProcessed, function (ind, val) {
- console.log(val);
- })
- });
- }
- });
- success: function(result) {
- console.log(result.od);
- console.log(result.od[0].percentageCompleted);
- }
- {
- "od": [
- {
- "dateProcessed": [
- "09/11/2014",
- "09/12/2014"
- ],
- "percentageCompleted": 25,
- "processRunning": 0,
- "successBatchCount": 0,
- "totalBatchCount": 0
- }
- ],
- "processDateInput": "12/11/2014"
- }
- var json = JSON.parse(result);
- var od = json['od'];
- var processDateInput = json['processDateInput'];
- $.each(od, function(index, value){
- console.log(value, index);
- });
- success: function(result) {
- console.log(result.od);
- console.log(result.od[0].percentageCompleted);
- console.log(od);
- $.each(result, function(idx, obj) {
- console.log(obj[0].dateProcessed);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement