Gets the value of a property on an object.
const obj = { a: { b: 123 } };getPropertyValue(obj, 'a.b');// => 123const obj2 = { a: { b: null } };getPropertyValue(obj2, 'a.b.c');// => undefined Copy
const obj = { a: { b: 123 } };getPropertyValue(obj, 'a.b');// => 123const obj2 = { a: { b: null } };getPropertyValue(obj2, 'a.b.c');// => undefined
The type of the object to get the property from.
The object to get the property from.
The property key to get the value of.
The value of the property, or undefined if it doesn't exist.
undefined
Generated using TypeDoc v0.24.7
Gets the value of a property on an object.
Example