db = {
things = {
["thing"] = {
name = "bla",
owner = "bla",
someOtherValue = "bla",
}
["another_thing"] = {
name = "bla",
owner = "bla",
someOtherValue = "bla",
}
}
}
ordertbl = {}
--Insert the tables from db.things into an ordered table
for name,data in pairs(db.things) do
table.insert(ordertbl, db.things[name])
end
How would I sort the new ordertbl by things[thing].name ?
Edited by darkrising, 28 November 2013 - 07:40 PM.











