id required default (none)The array name. Every array command that uses the same id reads and writes the same store, which lives for the whole page render. Choose a unique id per array so other examples on the page cannot collide with it. An empty id produces no output.
cmd required default (none)The operation to run on the array. set writes a value at a key (an empty key appends). get reads one key. addmulti splits a string and appends each part. addset adds a number into a key (a numeric accumulator). joinset appends a value to a key, separated by a delimiter. getall returns every value joined, optionally re-formatted and sorted. getfiltered returns only the values whose text contains a substring. An unknown command produces no output.
par1 optional default (none)First argument, meaning set by cmd. For set, addset and joinset it is the key (an empty key makes set append). For get it is the key to read. For addmulti it is the string to split. For getall it is the output template applied to each entry (the value, with _#1 standing for the value and _#2 for the key); leave it as _#1 to emit values unchanged. For getfiltered it is the substring to match.
par2 optional default (none)Second argument, meaning set by cmd. For set, addset and joinset it is the value to store. For addmulti it is the delimiter to split on (empty splits on a dash, or parses a [..] string as a JSON array). For getall and getfiltered it is the delimiter that joins the returned entries (the literal word json joins them as a JSON array instead). Not used by get.
par3 optional default (none)Third argument, used only by joinset and getall. For joinset it is the delimiter placed between the existing value and the appended one. For getall it is the sort order: key sorts by key ascending (numeric), rkey sorts descending, empty keeps insertion order.
{array:arr_am:addmulti:apple-pear-plum:-}{array:arr_am:getall:_#1:, }
{array:arr_sum:addset:total:10}{array:arr_sum:addset:total:5.5}{array:arr_sum:get:total}
{array:arr_app:set::red}{array:arr_app:set::green}{array:arr_app:set::blue}{array:arr_app:getall:_#1:, }
{array:arr_all:set:a:red}{array:arr_all:set:b:green}{array:arr_all:getall:_#1:, }
{array:arr_srt:set:3:c}{array:arr_srt:set:1:a}{array:arr_srt:set:2:b}{array:arr_srt:getall:_#1:-:key}
{array:arr_rk:set:1:a}{array:arr_rk:set:2:b}{array:arr_rk:set:3:c}{array:arr_rk:getall:_#1:-:rkey}
{array:arr_tpl:set:cs:Czech}{array:arr_tpl:set:en:English}{array:arr_tpl:getall:_#2=_#1:; }
{array:arr_flt:set:1:apple}{array:arr_flt:set:2:apricot}{array:arr_flt:set:3:banana}{array:arr_flt:getfiltered:ap:, }
{array:arr_join:joinset:tags:news: }{array:arr_join:joinset:tags:events: }{array:arr_join:get:tags}
[{array:arr_miss:set:x:1}{array:arr_miss:get:y}]
{array:arr_kv:set:greeting:Hello}{array:arr_kv:get:greeting}