Skip to content
HTTP & JSON jsonArrayShift

$jsonArrayShift[]

$jsonArrayShift removes and returns the first element from a JSON array — equivalent to JavaScript’s Array.shift(). This is ideal for FIFO (First In, First Out) queue processing. All remaining elements shift down by one index. Shifting from an empty array returns an empty string.

Syntax

bdfd
$jsonArrayShift[key]

Examples

Extract First Element with Shift

$jsonParse[{"queue":["First","Second","Third"]}]
$var[next;$jsonArrayShift[queue]]
$title[Array Shift (FIFO)]
$description[Next item served: **$var[next]**]
$color[#57F287]
$sendMessage[]