You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

from_csv()

Usage

from_csv(source[, delimiter[, quoteChar[, recordSeparator]]])

Description
Parses the given source string and returns an object representation of the string.
It is assumed that the CSV has a header. The header values are used as property names.

The default values for the optional parameters are:

  • delimiter = ;
  • quoteChar = "
  • recordSeparator = \n

Example

${from_csv('COL1;COL2;COL3\none;two;three')}
${first(from_csv('COL1;COL2;COL3\none;two;three')).COL2}

results in

[{COL3=three, COL2=two, COL1=one}]
two

Search results for "from_csv()"

from_csv()

Parses the given source string and returns an object representation of the string.
If the parameter headerList is not supplied, it is assumed that the first line of the CSV is a header and those header values are used as property names.
If the parameter is supplied, the given values are used as property names and the first line is read as data.

from_csv(source[, delimiter = ';' [, quoteChar = '"' [, recordSeparator = '\n' [, headerList ] ]]])