I want to sorted table values from lowest to highest without changing keys value.
for ex.
tbl = {
['1'] = 3,
['2'] = 1,
['3'] = 2,
['4'] = 0
}
I need to get table data with keys as a value.
tbl = {
['1'] = 4,
['2'] = 2,
['3'] = 3,
['4'] = 1
}
I tried a lot of different solution but I coundn't find the good one.