Hello there im kinda new to this so what i want to do is
string = {
"string2": {
"value": ""
}
}
var path = ["string2","value"]
can i somehow get the value with the path i tried alot of things but nothing really worked
>Solution :
You can use Array.reduce() for this:
const value = path.reduce((accum, key) => accum[key], string)