Retrieve random key from a table

Is there any way to retrieve a random key from a table, without using 2 sets of tables/arrays?

So if I have a table:


tbl = {
	First = 10,
	Second = 382,
	Third = "banana",
}

I want to randomly get First, Second, or Third

table.Random?

Not sure if there’s a direct way to do this but you could always do

[lua]
table.Random( table.GetKeys( tabl ) )
[/lua]

But that will give you a random key (“First”, “Second” or “third”) so make sure that’s what you want, otherwise just use table.Random

local _, key = table.Random( tbl)

Thanks