getIn

Returns the value of a nested key within an object of objects.

function getIn<T extends object>(o: T, nestedKeys: [string, string, ...rest: string[]])

// Example:

const nestedObject = { a: { b: { c: 42 } } }

getIn(nestedObject, ["a", "b", "c"]) //=> 42