UnpackTable
This function was added in DSL 4
Description
Unpacks a table previously packed using PackTable.
function UnpackTable(serializedTable) --[[ ... ]] end
Parameters
serializedTable:string- The serialized string containing the packed table.
Return Values
table- The unpacked table.
Versions
- DSL 7 -
light userdatais supported, which lets you serialize hashes returned byObjectNameToHashID.
Example
local serialized = PackTable({
name = 'Example',
value = 42,
nested = { key = 'value' },
flag = true,
})
local unpacked = UnpackTable(serialized)
print('Unpacked Table Name: ' .. unpacked.name)
print('Unpacked Table Value: ' .. unpacked.value)