Skip to main content

$$formparse

Parses a Form URL-Encoded string to object

  • Every element will have 2 forms in the result object:
    • Singular with its original query name (e.g. q)
    • Plural with its name suffixed with $$ (e.g. q$$)

Usage​

{ 
"$$formparse": /* form url-encoded string */
}
"$$formparse:{input}"

Returns​

object

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimarystringYesform url-encoded string

Examples​

Input

Definition

Output

"a=1&b=B&c"
"$$formparse:$"
{
"a": "1",
"a$$": [
"1"
],
"b": "B",
"b$$": [
"B"
],
"c": "true",
"c$$": [
"true"
]
}
"a=1&a=2"
"$$formparse:$"
{
"a": "1",
"a$$": [
"1",
"2"
]
}
"a=1&b=B&c"
{
"$$formparse": "$"
}
{
"a": "1",
"a$$": [
"1"
],
"b": "B",
"b$$": [
"B"
],
"c": "true",
"c$$": [
"true"
]
}
"a=1&a=2"
{
"$$formparse": "$"
}
{
"a": "1",
"a$$": [
"1",
"2"
]
}