Garry's Mod Wiki

table.GetKeys

  table table.GetKeys( table tabl )

Description

Returns all keys of a table.

Arguments

1 table tabl
The table to get keys of

Returns

1 table
Table of keys

Example

Example usage

local tabl = { one = "A", two = "B", } PrintTable( table.GetKeys( tabl ) )
Output:
1 = one 2 = two