I have a bunch of pairs of points that looks like this: data = [[89.9583, 112.62], [84.0692, 112.831], [78.1725, 113.479], [72.2575, 114.544], [66.3062, 115.993], [60.2906, 117.779], [54.1706, 119.846], [47.893, 122.122], [41.3925, 124.525], [34.5948, 126.958], [27.425, 129.309], [314.68, 127.196], [309.017, 123.498], [304.284, 119.31], [300.439, 114.725], [297.422, 109.832], [295.176, 104.708], [293.651, 99.4211], [292.812, 94.0335], [292.638, 88.6029], [247.357, 88.6799], [247.201, 94.1111], [246.379, 99.5013], [244.872, 104.793], [242.642, 109.924], [239.641, 114.826], [235.809, 119.422], [231.086, 123.624], [225.428, 127.336], [152.499, 129.487], [145.319, 127.122], [138.516, 124.675], [132.014, 122.256], [125.736, 119.963], [119.618, 117.878], [113.604, 116.073], [107.655, 114.605], [101.742, 113.52], [95.847, 112.852]]
I need to sort that list with the first number of the pair from lowest to highest. Is there a way to do that directly in glowscript or I need to make my own def the old fashion way?
sorted(data) kind of does it but not correctly (maybe I do not use it properly, but I find no documentation).