I have this table which I want to show it’s content in a tableView:
local table = { item1 = {name="Item1", num=1, model=5040}, item2 = {name="Item2", num=2, model=5050}, item3 = {name="Item3", num=3, model=5060}, }
Using (for k,v in pairs) doesn’t return the elements in a numerical order aka the order of their creation. I tried “table.sort()” but it also doesn’t work with this kind of a table. I was wondering if there is a way to achieve what I want.