#How to sort table with inside of table value

10 messages · Page 1 of 1 (latest)

delicate apex
#

Sort with value ?

analog moon
#

Yes, with power value

delicate apex
#

O

#

I don't think you can't sort a dict

analog moon
#

-- 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)

delicate apex
#

Because it works for array not dict

#

You can try
local property = {...,NewPet=newpet}
table.insert(profile.data.pets,property)

delicate apex
analog moon
#

--First of all, I apologize for my late reply.
I don't quite understand what you mean, can you explain a little more?

#

@delicate apex