Tbh in this case it would probably just be fine to make your own solution by making a auxiliary table and finding and removing the smallest creating date. then placing this into the first of the aux table then set old table to aux table and clear aux table memory.
This is how I was able to accomplish what you wanted,
Levels = {
{
Name = "Level1",
CreationDate = 1648951766, -- epoch time stamp (os.time)
Data = 353453
},
{
Name = "Test123",
CreationDate = 164894654,
Data = 56756978968745658
},
{
Name = "Egg Race",
CreationDate = 164893257,
Data = 13544645
},
}
table.sort(Levels, function(a, b)
return a.CreationDate < b.CreationDate
end)
for i,v in pairs(Levels) do
print(v.Name, v.CreationDate)
end
Credit to the blow person: MysteriousVagabond for fixing one of my initial mistakes