$$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$$
)
- Singular with its original query name (e.g.
Usage​
{
"$$formparse": /* form url-encoded string */
}
"$$formparse:{input}"
Returns​
object
Arguments​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
Primary | string | Yes | form 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"
]
}