I'm trying to use an array of strings to access a value nested within an object.
Is there a utility for this already?
let obj= {
one: {
two: {
thee: "test"
}
}
}
let values= ["one", "two", "three"]
function accessObjectWithArray(obj, arr) {
// returns "test"
}
_.get(obj, arr)