StructToQueryString

Converts a struct to a query string using the specified delimiter.

The default delimiter is {@code "&"}

Method Signature

StructToQueryString(struct=[structloose], delimiter=[string])

Arguments

Argument
Type
Required
Description
Default

struct

struct

true

The struct to convert

delimiter

string

false

The delimiter to use in the query string. Default is "&"

&

Examples

structToQueryString with the default delimiter

Converting a struct to a query string using the default delimiter (&)

Run Example

someStruct = { 
	"firstName" : "John",
	"lastName" : "Doe"
};
writeDump( structToQueryString( someStruct ) );

Result: firstName=John&lastName=Doe

Last updated

Was this helpful?