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
Post a Comment