Home > @opennd/lib > getPropByPath
getPropByPath() function
使用字符串点操作获取对象中属性
Signature:
typescript
export declare function getPropByPath(obj: any, path: string, strict: any): {
o: any;
k: string;
v: any;
};Parameters
Parameter | Type | Description |
|---|---|---|
obj | any | |
path | string | |
strict | any |
{ o: any; k: string; v: any; }
Example
getPropByPath(obj, 'a.b.c')