Skip to content
Lists & Helpers arrayPushJSON

$arrayPushJSON — Appends JSON values (numbers, objects, lists) to an array.

Appends JSON values (numbers, objects, lists) to an array.

Syntax

$arrayPushJSON[array;values]

Parameters

  • array (text, required) — Name of the array.
  • values (text, required) — JSON values to append.

Return Value

  • string.

Usage

$arrayPushJSON[a;{"x":1}]

Example

$arrayLoad[a;,;3,1,2]
$arrayPushJSON[a;[1]]
$sendMessage[$arrayJoin[a;-]]

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.