Garry's Mod Wiki

table.CollapseKeyValue

table table.CollapseKeyValue( table input )

Description

Collapses a table with keyvalue structure

Arguments

1 table input
Input table

Returns

1 table
Output table

Example

Example usage

local output = table.CollapseKeyValue( { { Key = "mykey1", Value = "myvalue1" }, { Key = 123, Value = 1345 }, { Key = 1345, Value = "myvalue1" }, } )
Output:
local output = { [ "mykey1" ] = "myvalue1", [ 123 ] = 1345, [ 1345 ] = "myvalue1", }

Page Links


Special Pages


Wikis

?

Render Time: 28ms

DB GetPage 4
Generate Html 3
SaveChanges (1) 13
Render Body 0
Render Sidebar 6