collectype

collectype v0.11.0


collectype / utils/pipe/pipeFunctions / parseArray

Function: parseArray()

parseArray(str): any[]

Defined in: utils/pipe/pipeFunctions.ts:205

Parses an array string into an array of values.

Parameters

str

string

The array string (e.g., “[1, 2, 3]”)

Returns

any[]

The parsed array (any[])

Example

parseArray('[1, 2, 3]'); // [1, 2, 3]
parseArray('[]'); // []