#How to sort table with inside of table value
10 messages · Page 1 of 1 (latest)
Yes, with power value
-- I found this solution but not work for me, i dont know why
local tableToSort = Remotes.GetData:InvokeServer("Pets")
table.sort(tableToSort, function(a, b)
return a.Power > b.Power
end)
Because it works for array not dict
You can try
local property = {...,NewPet=newpet}
table.insert(profile.data.pets,property)
With that this script should works