Skip to content
Lists & Helpers arrayUnshiftJSON

$arrayUnshiftJSON — Adds JSON values at the start of an array.

Adds JSON values at the start of an array.

Syntax

$arrayUnshiftJSON[array;values]

Parameters

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

Return Value

  • string.

Usage

$arrayUnshiftJSON[a;[1]]

Example

$arrayLoad[a;,;3,1,2]
$arrayUnshiftJSON[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.