Skip to main content
Version: 2.x

API Reference > @easyops-cn/brick-next-pipes > get

get() function

获取一个对象指定属性(路径)的值。

Signature:

export declare function get(
object: Record<string, unknown>,
path: string | string[],
defaultValue: unknown
): unknown;

Parameters

ParameterTypeDescription
objectRecord<string, unknown>对象。
pathstring | string[]属性(路径)。
defaultValueunknown当获取的值为 undefined 时返回的默认值。

Returns:

unknown

结果。

Remarks

透传调用 _.get

Object