Garry's Mod Wiki

Garry's Mod Wiki

  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", }

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...