Skip to content
HTTP & JSON jsonArrayAppend

$jsonArrayAppend[]

$jsonArrayAppend adds a value to the end of an existing JSON array. It is the JSON equivalent of JavaScript’s Array.push(). The key must exist and must contain an array. Use $jsonArrayUnshift to add to the beginning, and $jsonArrayPop to remove from the end.

Syntax

bdfd
$jsonArrayAppend[key;value]

Examples

Append Item to JSON Array

$jsonParse[{"roles":["Member"]}]
$jsonArrayAppend[roles;Moderator]
$title[Array Append]
$description[Updated roles array: `$jsonStringify`]
$color[#57F287]
$sendMessage[]