标签:json分组
angular.forEach(rightOptions.options,function(v,k){ _label = v.group; var subInsertMenus = {}; if(!rightMenus[_label]){//判断父节点是否存在 subMenu(v); subInsertMenus[v.label] = srm; var rm = { "label": _label, "separator_before":false, "separator_after":false, "submenu":subInsertMenus }; rightMenus[_label] = rm; }else{ subMenu(v); rightMenus[_label].submenu[v.label] = srm; } });标签:json分组
原文地址:http://blog.51cto.com/dd118/2051721