I am interested in inserting a table within a table in lua
mytable1={"apple","banana","grape"}
mytable2={"one","two","three"}
I want to insert mytable2
in position 4 of mytable1
... so after the merger it should look somewhat like this
mytable1={"apple","banana","grape",{"one","two","three"}}
So far I tried it this way:
table.insert(mytable1,4,mytable2)
print(mytable[4])
the result is
table: 0x900b128
instead of mytable2
..
I am quite confused.Please advice me where I am doing wrong and what is the right way to proceed.