How do you use select() with dictionaries

How do I get the length of the dictionary using select() function?

1 Like

Its only possible to determine the length of arrays in lua; there is no inherent way to find the length of a dictionary. This goes for each way to determine the length of a table: any key/value entry will not be counted in the length. Methods like using the # operator, select("#", ...) and iterating using ipairs() will not work.

The only way I know of to find the “length” of a dictionary is to iterate over it using pairs() and count each time it makes an iteration.