HTTP & JSON
jsonFromPairs
$jsonFromPairs — Builds a JSON object without any quote to escape
Builds a JSON object without any quote to escape.
Syntax
$jsonFromPairs[(key;value;key;value;...)]
Parameters
- key (text, required) — The name of the field.
- value (text, required) —
true,falseandnullstay literals, a plain number of at most 15 digits is a number, anything else is text (so an ID never loses digits).
Return Value
- string: the JSON text.
Usage
$jsonFromPairs[name;Ann;age;30] → {"name":"Ann","age":30}
Example
$sendMessage[$jsonFromPairs[name;Ann;age;30]]
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.