sorting subtables
Posted: Mon Jun 24, 2024 11:34 am
Sorry, probably it's my short comprehension, but how can I use the sort command to sort a table by a subtable?
i.e.
t={}
t[0]={name="pippo",age=32}
t[1]={name="pluto",age=24}
t[2]={name="ilBarbax",age=66}
Sort(t.name) does not work
i.e.
t={}
t[0]={name="pippo",age=32}
t[1]={name="pluto",age=24}
t[2]={name="ilBarbax",age=66}
Sort(t.name) does not work