json變成樹形數組

var treeData=[] treeData=toTree(list,0) const toTree=(data,department)=>{ var tree = []; var temp; for (var i = 0; i < data.length; i++) { if (data[i].department == department) {
相關文章
相關標籤/搜索