通过路径获取对象中的值
const obj = {a: {b: {c: 123}}};const value = getValueByPath<number>(obj, 'a.b.c'); // value = 123 Copy
const obj = {a: {b: {c: 123}}};const value = getValueByPath<number>(obj, 'a.b.c'); // value = 123
路径
Optional
返回路径对应的值
通过路径获取对象中的值
Example