Function: getPath()
Makaio Framework / bus-core / getPath
Function: getPath()
Section titled “Function: getPath()”getPath(
obj,path):unknown
Defined in: ../../../packages/bus-core/src/utils/payload-filter.ts:23
Get a nested value from an object using dot-notation path.
Parameters
Section titled “Parameters”unknown
Object to traverse
string
Dot-notation path (e.g., ‘raw.msg.type’)
Returns
Section titled “Returns”unknown
Value at path, or undefined if not found
Example
Section titled “Example”const obj = { raw: { msg: { type: 'event' } } };getPath(obj, 'raw.msg.type'); // 'event'getPath(obj, 'raw.missing'); // undefined