Skip to content

getNestedPropertyValue

Gets the value of a nested property from an object.

Import:

import { getNestedPropertyValue } from '@mnaoumov/typescript-lib/object-utils';

Signature:

function getNestedPropertyValue($object: Record<string | symbol, unknown>, path: string): unknown

Parameters:

Parameter Type Description
$object Record<string | symbol, unknown>
path string The path to the nested property.

Returns: unknown — The value of the nested property.