let's say I have the following array :
let path = ['foo','bar']
And I have this item :
let item = {
faa: 'whatever',
foo: {
bar: 'hello there', //general kenobi
bor: 'nope'
}
}
I want to access "hello there" using something looking like :
item[path] or item.path or item[path.join(".")]
You get the idea, is this doable and if yes, how ? (of course what is written in this question does not work)