Object
toPath

Converts the given string into an object property path array.

Syntax

import { toPath } from '@opentf/std';
 
toPath(str: string): (string | number)[]

Examples

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

Try