I want to iterate through the nested objects and add a child to a specific object (Maria Jhonson with id = 201). Update my state and display it on the screen.
root = [{
id: 105,
name: "Jhon Doe",
children: [{
id: 106,
name: "Alicia Thomber",
children: [{
id: 101,
name: "Sven Mortensen",
children: []
}]
},
{
id: 110,
name: "Alan Steiner",
children: [{
id: 107,
name: "Jack Wills",
children: [{
id: 101,
name: "David Wilson",
children: [{
id: 115,
name: "Amy Alberts",
children: [{
id: 201,
name: "Maria Jhonson",
children: []
}]
}]
}]
}]
}]
}]