getItem(obj, arr, index) { if (arr.length - 1 !== index) { const tempObj = obj[arr[index]]; this.getItem(tempObj, arr, index + 1); } return obj[arr[index]]; }, const obj = { foo: { bar: { name: 'biz' } } }; const path = 'foo.bar.name'; const childArr…