javascript - Kendo Ui nested JSON Parse -


i having issues in pushing sharepoint nested json objects "results" data can used in kendo grid.

any appreciated.

parse: function (data) {     console.log(data.d.results.length);     var results = [];     (var = 0; < data.d.results.length; i++) {             var items = data.d.results[i];             (var x = 0; x < item.attachmentfiles.results.length; x++) {             var attachment = {                 attachments: item.attachmentfiles.results[x].filename         };          results.push(attachment);     }     return data.d.results && results; } } 

so work around able place attachmentfiles in function column template.

title: "attachmentfiles", template: function (d) {                          var attachments = [];                          (var x = 0; x < d.attachmentfiles.results.length; x++) {                              console.log(d.attachmentfiles.results[x].filename);                              attachments.push(d.attachmentfiles.results[x].filename);                           }                          return attachments;                     } 

Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -