has a string like this.
ouabc;ouweix;oualex;5;oumyhome;1;
wants to replace the number in it with the value in the following json (match the value of id and take the id in all the children under the id). Like this: ouabc;ouweix;oualex;ou9QFwjzTVc;ou9QFwk1I4q;ou9QFwh0aqC;ou9QFwp-LV;oumyhome;ou9QFwijJ4;ou9QFwoPJh;
{
"data": [
{
"id": "1",
"deptname": "",
"children": [
{
"id": "ou9QFwijJ4",
"deptname": "",
"children": []
},
{
"id": "ou9QFwoPJh",
"deptname": "",
"children": []
}
]
},
{
"id": "5",
"deptname": "",
"children": [
{
"id": "ou9QFwjzTVc",
"deptname": "",
"children": []
},
{
"id": "ou9QFwk1I4q",
"deptname": "",
"children": []
},
{
"id": "ou9QFwh0aqC",
"deptname": "",
"children": []
},
{
"id": "ou9QFwp-LV",
"deptname": "",
"children": []
}
]
}
]
}