01.11.2022, 13:23
Code:
table.sort(spot, function(a, b)
return a.price < b.price
end)
min = spot[1]
minvalue = min.price
minhour = min.time --:match('T(%d+)')
log(minvalue, minhour)
max = spot[#spot]
maxvalue = max.price
maxhour = max.time --:match('T(%d+)')
log(maxvalue, maxhour)