For the complete documentation index, see llms.txt. This page is also available as Markdown.

QueryStringToStruct

Convert a query string to a struct.

Each key-value pair in the query string is separated by a delimiter. The default delimiter is {@code "&"}

Example:

 queryStringToStruct( "foo=bar&baz=qux" );
 "foo=bar&baz=qux".toStruct();
 

Method Signature

QueryStringToStruct(target=[string], delimiter=[string])

Arguments

Argument
Type
Required
Description
Default

target

string

true

The query string to convert.

delimiter

string

false

The delimiter used to separate key-value pairs in the query string.

&

Examples

Convert a query string to a struct

result = queryStringToStruct( "name=Luis&age=42&city=NYC" );
writeOutput( result.name );

Result: Luis

Using the member function

Result: bar,qux

Last updated

Was this helpful?