var data = [{"menu":47,"children":[56]},{"menu":47,"children":[55]},{"menu":48,"children":[59]},{"menu":48,"children":[58]}]遍历data找出相同menu在合并children,得到下面数据结构[{"menu":47,"children":[55,56]},{"menu":48,"children":[58,59]}]
相关分类