_Added in 4.4_ */mtable -aTNAVB [N..] * */mtable -eTNAVB [N..] * */mtable -iTNAVB [N..] * */mtable -lJXI * */mtable -sJXI * */mtable -d [N..] * */mtable -f * Adds/removes/inserts/modifies items in a multi dimensional table/array. Items are not unique and the table is always ordered based on the N position in the table. _See also [[$mtable]]._ *Parameters* table(ktable). |*Parameter*|*Description*| | | Name of the table to modify. | | [N..] | Indicates the item should be added/inserted/deleted from sub table at position N, subsequent N parameters travels further down. | | | The Nth item in a table or sub table to modify. | | | The item name. | | | The item value. | *Switches* table(ktable). |*Switch*|*Description*| | -a | Add a new item to a table. | | -e | Edit a item in a table. | | -i | Insert a new item to a table. | | -d | Delete a item from a table. | | -l | Loads a table from a file. | | -s | Saves a table to a file. | | -f | Free/delete a table. | | -T | Indicates the type is text. | | -N | Indicates the type is a number. | | -B | Indicates the type is a boolean. | | -A | Indicates the type is a sub table/array. | | -J | Indicates the file to load/save should be in "JSON":https://en.wikipedia.org/wiki/JSON format. | | -X | Indicates the file to load/save should be in "XML":https://en.wikipedia.org/wiki/XML format. | | -I | Indicates the file to load/save should be in "INI":https://en.wikipedia.org/wiki/INI_file format. | *Example*
; Add item1/value1 to the table 'table1'.
//mtable -a table1 item1 value1

; Add sub table 'item2' to the table 'table1'.
//mtable -aA table1 item2 value2

; Insert item3/value3 at position '1' in the table 'table1'.
//mtable -i table1 1 item3 value3

; Print number of items in table 'table1'.
//echo -ag Number of items in table1 is $mtable(table1, 0)

; Print the first items in table 'table1'.
//echo -ag First item in table1 is $mtable(table1, 1).item

; Delete the first item in table 'table1'.
//mtable -d table1 1

; Free the table 'table1'.
//mtable -f table1

; Add a new sub table to table 'table1',
//mtable -aA table1 sub1 sub1

; Add a new item to the sub table located at position '1' in table 'table1'.
//mtable -a table1 1 item1 value1

; Print the first item in the table 'table1', which is a sub table.
//echo -ag First item in table1 is $mtable(table1, 1).item - $mtable(table1, 1).type

; Print the first item in the sub table located at position '1' in table 'table1'.
//echo -ag First item in sub table1 is $mtable(table1, 1, 1).item

; Generates a json output of table 'table1'.
//echo -ag $mtable(table1).json

; Generates a ini output of table 'table1'.
//echo -ag $mtable(table1).ini

; Generates a xml output of sub table at position '1' in table 'table1'.
//echo -ag $mtable(table1, 1).xml

; Save 'table1' as a json file.
//mtable -sJ table1 table.json

; Load the json file 'table.json' into a new table 'table2'.
//mtable -lJ table2 table.json