I have a table that is populated with values like these:
myTable = {} counter = 0 for i = 1, #MyDBTable do myTable[i] = {} myTable[i].counter = tonumber(math.random(1,8)) myTable[i].name = tostring(math.random(1,8)) end
I was wondering if how can I use the “table.sort” that will sort myTable[i].counter from the least to the greatest value or vice versa. How am I gonna utilize the table.sort? thanks in advance