How to sort a table that has variables assigned to the value

I am trying to sort my table so I can then just do table[1], table[2], etc. However, I do not know how to do this as the table isn’t just {0,5,1,3} it contains variables {Variable = 1, Variable = 2}.

The table looks like this (would be more data if more players but you get the idea of its structure):
https://gyazo.com/c65ab458dbdceb7c888ab193deaa4b01

Dictionaries have no order and can’t be sorted. You have two options. You can either re-write it like this:

{{"Variable", 1}, {"Variable", 2}}

Or you can do this

local Data = {Variable1 = 1, Variable2 = 2, Variable3 = 3}
local Keys = {"Variable1", "Variable2", "Variable3"}

After this, you can sort the Keys table instead of the Data table and use it as an index.

So the module I am using creates the dictionary using this function, how would I modify it to match your example number 1?

function Path:GetAllProgress(Mode)
	local Summary = {}
	for k, v in pairs(self.PlayerProgress) do
		Summary[k] = (Mode==0 or string.lower(tostring(Mode)) == "absolute") and Path.PlayerProgress[k] or Path.PlayerProgress[k]/self.Length
	end
	return Summary
end

That would look like this:

function Path:GetAllProgress(Mode)
	local Summary = {}
	for k, v in pairs(self.PlayerProgress) do
		table.insert(Summary, {k, (Mode==0 or string.lower(tostring(Mode)) == "absolute") and Path.PlayerProgress[k] or Path.PlayerProgress[k]/self.Length})
	end
	return Summary
end

And then to retrieve information:

local key, value = Summary[someNumber][1], Summary[someNumber][2]