JavaScriptで多次元配列を並べ替える方法
how to sort this multi dimensional array in javascript
var arr = [];
arr[0] = [{id:1}, {id:5}, {id:7}];
arr[1] = [{id:3}, {id:8}, {id:6}];
arr[2] = [{id:2}, {id:4}, {id:9}];
The output should be like this
arr[0] = [{id:1}, {id:2}, {id:3}];
arr[1] = [{id:4}, {id:5}, {id:6}];
arr[2] = [{id:7}, {id:8}, {id:9}];