The type of the input record
The key path tuple
A new record containing only the nested property at the path
const data = { a: { b: { c: 1, d: 2 }, e: 3 }, f: 4 } as const;
// Direct usage
const result = Obj.deepPick(data, ['a', 'b', 'c']);
assert.deepStrictEqual(result, { a: { b: { c: 1 } } });
// Curried usage with pipe
const pickName = Obj.deepPick(['user', 'name']);
const result2 = pipe(data).map(pickName).value;
Deeply picks a nested property from an object along the specified key path. Supports both direct and curried usage.
The key path tuple
A readonly tuple of keys representing the nested path
A new record containing only the nested property at the path
const data = { a: { b: { c: 1, d: 2 }, e: 3 }, f: 4 } as const;
// Direct usage
const result = Obj.deepPick(data, ['a', 'b', 'c']);
assert.deepStrictEqual(result, { a: { b: { c: 1 } } });
// Curried usage with pipe
const pickName = Obj.deepPick(['user', 'name']);
const result2 = pipe(data).map(pickName).value;
Deeply picks a nested property from an object along the specified key path. Supports both direct and curried usage.