As the title mention, I want to replace the values of a particular key in a javascript object.
Sample Array -
[{
title: "stackflow",
child: [{
title: 'stack',
child: [{
title: 'javascript stack',
child: [{
title: 'stack node',
child: []
}]
}]
}]
}]
Value to be replaced key is title and value stack with stackoverflow anywhere in the array.
I already google and tried many solutions but didn't get the proper solution for this. Any reference link or solution most welcome, Thanks in advance.
titlekeys and then, if the value is "stack", replace it with "stackoverflow"?