Skip to content

toPaths

toPaths(obj, parentKey?): string[]

Defined in: packages/store-kit/src/objects/paths.ts:10

Recursively generates the paths for all keys in an object or array, formatted as dot notation.

Parameters

obj

unknown

The object or array for which to generate key paths.

parentKey?

string

The key or path of the parent object, used to build the complete key paths.

Returns

string[]

An array of strings representing the paths of the keys in dot notation.