Can someone explain this to me? I have figured it out through this tutorial that this is known as a table. Coming from a C/C++ background, can someone explain how this works (I am trying to understand some existing Lua code)?
config = {
devices = {
C56 = "/dev/ttyS2",
ELTRA = "/dev/ttyS3",
-- MICORE = "/dev/ttyS4",
HID = "/dev/ttyS1",
KEYCARD = {
-- [6] = { tty="/dev/ttyS1", speed=9600 },
[7] = { tty="/dev/ttyS4", speed=9600 },
},
},
}
Is it a config table, consisting of a device table but then there is a KEYCARD table? What are C56 and ELTRA called in Lua? Are they fields?