var data = [ [0.00000979, 1730], [0.00000969, 206], [0.00000955, 3141], [0.00000951, 525], [0.00000941, 159], [0.0000095, 1000] ] var sortedData = data.sort((a, b)=>a[0] < b[0]); console.log(sortedData)输出结果:
[ [0.00000979,1730], [0.00000969,206], [0.00000955,3141], [0.00000951,525], [0.0000095,1000], [0.00000941,159 ] ]