Object
fromPath

Converts the given array values into an object property path string.

Syntax

import { fromPath } from '@opentf/std';
 
fromPath(arr: (string | number)[] = []): string

Examples

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

Try