table.Merge
From GMod Wiki
Function | |
Syntax |
table.Merge( Table destination table, Table source table ) Where is this used? |
Description: | |
Merges the contents of a table into another table. | |
Returns: | Table destination table |
Part of Library: | Table |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Table.Merge]Table.Merge [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Additional Notes
- This sends and overwrites keys. Say table1.mykey = "test", and you do a table merge of table2, which has table.mykey = "alpha", table1.mykey will then equal "alpha".
- Due to it's nature to overwrite numbered keys, you may want to use table.Add if you are dealing with a table with numbered keys.