I got a table of form let's say:
house = {
["Street 22"] = {
{name = "George", age = 20},
{name = "Pete", age = 25}
},
["Street 30"] = {
{name = "John", age = 32},
}
}
And I want to insert programmatically a third house, that is key "Street 35", with a person's details, Nick and 30 let's say. I am relatively new to lua and don't know how to do this, I must use table.insert but I am having troubles following the above format... Some help please?
Do it simple so:
house["Street 52"] = {{name = "Nick", age = 30}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With