getPathValue
Takes in an object and a key and returns the value of the key.
Params
Section titled “Params”Signature: getPathValue(obj, key)
obj
: The object to get the value from
key
: The key to get the value from (supports dot notation)
Returns
Section titled “Returns”Returns the value of the key.
Examples
Section titled “Examples”import { getPathValue } from '@adobe-commerce/elsie/lib';
const obj = { foo: { bar: 'baz', },};
const result = getPathValue(obj, 'foo.bar');
console.log(result); // "baz"