toPath

Util
since 4.0.0

Arguments

  • * The value to convert.

Returns

Array the new property path array.

Converts value to a property path array.

Example of Lodash _.toPath

_.toPath('a.b.c');
// => ['a', 'b', 'c']

_.toPath('a[0].b.c');
// => ['a', '0', 'b', 'c']