data A:
[
{
"id":340,
"name":"",
"sub":[
{
"id":341,
"name":""
},
{
"id":367,
"name":"",
"children":[
{
"id":427,
"name":""
}
]
}
]
}
]
data B:
[
{
"id":340,
"name":"",
"sub":[
{
"id":342,
"name":""
},
{
"id":367,
"name":"",
"children":[
{
"id":428,
"name":""
}
]
}
]
},
{
"id":344,
"name":"/",
"sub":[
{
"id":347,
"name":""
},
{
"id":363,
"name":"",
"children":[
{
"id":421,
"name":""
}
]
}
]
}
]
data B is merged into data A result:
[
{
"id":340,
"name":"",
"sub":[
{
"id":341,
"name":""
},
{
"id":367,
"name":"",
"children":[
{
"id":427,
"name":""
},
{
"id":428,
"name":""
}
]
},
{
"id":342,
"name":""
}
]
},
{
"id":344,
"name":"/",
"sub":[
{
"id":347,
"name":""
},
{
"id":363,
"name":"",
"children":[
{
"id":421,
"name":""
}
]
}
]
}
]