varData=[{accounts: [], Attrs: {maxmailboxsize:"-1", Maxusers: "-1"}, FullPath:"", ID: "og59fdbc30578", Modifytime:"", Name: "123", Poid: "", Children: []}, {accounts: [], Attrs: {maxmailboxsize:"-1", Maxusers: "-1"}, FullPath:"", ID: "og59fdbc30578", Modifytime:"", Name:"Development Department", Poid:"", Children: [{accounts: [], Attrs: {maxmailboxsize:"Development department 1", Maxusers: "1"}, FullPath:"", ID: "og59fdbc30578", Modifytime:"", Name:"Development Department 1", Poid:"", Children: [{accounts: [], Attrs: {maxmailboxsize:"Development department one by one", Maxusers: "1"}, FullPath:"", ID: "og59fdbc30578", Modifytime:"", Name:"Development Department 11", Poid:"", Children: [{accounts: [], Attrs: {maxmailboxsize:"-1", Maxusers: "-1"}, FullPath:"", ID: "og59fdbc30578", Modifytime:"", Name:"Development Department 111", Poid:"", Children: [{accounts: [], attrs: {maxmailboxsize : "-1", Maxusers: "-1"}, FullPath:"", ID: "og59fdbc30578", Modifytime:"", Name:"Development Department 1111", Poid:"", Children: [{accounts: [], attrs: {ma Xmailboxsize:"-1", Maxusers: "-1"}, FullPath:"", ID: "og59fdbc30578", Modifytime:"", Name:"Development Department 1111", Poid:"", Children: [{accounts: [], Attrs: {maxmailboxsize:"-1", Maxusers: "-1"}, FullPath:"", ID: "og59fdbc30578", Modifytime:"", Name:"Development Department 111111", Poid:"", Children: []}]}] }] }] }] }] }];if(Data! = "" && data.length>0){ for(vari=0;i<data.length;i++) {Console.log (data[i]); vars =Data[i]; s["Subditems"]=S.children; Console.log (s); }}console.log (data);
Add JSON attributes and assign or modify JSON properties (ztree tree structure)