get
get<
T>(params):unknown
Defined in: objects/get/index.ts:23
Reads a nested value from an object using dot-notation path.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”params
Section titled “params”GetParams<T>
The parameters object
Returns
Section titled “Returns”unknown
The value at path, or defaultValue if the path is unreachable
Example
Section titled “Example”get({ obj: { address: { city: "São Paulo" } }, path: "address.city" });// => "São Paulo"
get({ obj: { a: 1 }, path: "a.b", defaultValue: "BR" });// => "BR"Keywords
Section titled “Keywords”read nested, dot notation, deep access, safe access, property path, lodash get