Hi.
I’m wondering that would be the best way to sort a table with os.time in it so it would go from the lowest to the highest os.time.
Basically, imagine my JSON table something like that:
If it’s consistently in that format, something like this should work. You would have to do it before converting the outer table to JSON. I don’t know why you said it doesn’t keep the same order, because it definitely should keep the array’s order.
Basically, my solution is that it takes time from each json table and sorts it. After that, it would loop through the main json table and compare each time with each time in that table where only time is. If it matches, it would replace it.
If your method works fine, no need to use my method. I was just showing a potential way to do it with string patterns, and both should work just as well.