Type | function |
Library | PLUGIN_NAME.* |
Return value | None |
Keywords | json |
See also |
This function recursively prints the contents of a table to the console.
PLUGIN_NAME.printTable( t )
PLUGIN_NAME.printTable( t, label )
PLUGIN_NAME.printTable( t, label, indentLevel )
Table. The Lua table you want to print to console.
String. An optional string to be printed on its own line, before the contents of the table are printed. If nil or none provided, then no line is printed.
Number. The number of tabs indented before each line. Default is 0.
local PLUGIN_NAME = require 'plugin.PLUGIN_NAME'
local colors =
{
{ name = "red", value = { 1, 0, 0, 1 }, },
{ name = "green", value = { 0, 1, 0, 1 }, },
{ name = "blue", value = { 0, 0, 1, 1 }, },
{ name = "cyan", value = { 0, 1, 1, 1 }, },
{ name = "magenta", value = { 1, 0, 1, 1 }, },
{ name = "yellow", value = { 1, 1, 0, 1 }, },
}
PLUGIN_NAME.printTable( colors )