$jsonArrayCount[]
$jsonArrayCount returns the number of elements of the JSON array found at the given path, or 0 if the value is missing or is not an array. It never modifies the document.
Syntax
$jsonArrayCount[(key);(...)]
Parameters
The path is given as separate arguments, one per level (no dot notation: a.b is a single key named a.b). Surrounding spaces are removed and empty arguments are skipped. A whole-number argument selects an element when the current value is an array; otherwise it is used as an object key. At most 100 arguments are accepted in total. With no argument, the whole document is targeted (so the result is 0 unless the document itself is an array).
Examples
Count Items in JSON Array
$jsonParse[{"items":["Sword","Shield","Potion"]}]
$title[Inventory Item Count]
$description[You have **$jsonArrayCount[items]** items in your bag.]
$color[#5865F2]
Use $jsonForEach to iterate over all the elements.
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.