let a = [
{name:'深圳-宝安'},
{name:'广州-南沙'},
{name:'深圳-福田'},
{name:'广州-番禺'},
]
需要得到:
let b = [
{
Province:'广州',
childList: [
{city: '南沙'},
{city: '番禺'}
]
},
{
Province:'深圳',
childList: [
{city: '宝安'},
{city: '福田'}
]
}
]