Hi first of all I would like to state that yes, this question has been answered here Update value of a nested dictionary of varying depth however, this is in Python
.
I would like to know if there's a Javascript
approach to solving this issue.
Let's say I have a dictionary as such:
{
"group1" : {
"name" : "NAME1"
},
"group2" : {
"name" : "NAME2"
}
}
How would I be able to replace "NAME1"
with lets say "Bob White"
without doing this dict["group1"]["name"] = "Bob White"
?
Could someone help please? Thanks