Garry's Mod Wiki

util.TableToKeyValues

  string util.TableToKeyValues( table table, string rootKey = "TableToKeyValues" )

Description

Converts the given table into a Valve keyValue formatted string.

Use util.KeyValuesToTable to perform the opposite transformation.

util.TableToJSON can be used as an alternative.

Arguments

1 table table
The table to convert.
2 string rootKey = "TableToKeyValues"
The root key name for the output KV table.

Returns

1 string
The output.