react中的api获取数组排序
[javascript - Sort an array of objects in React and render them - Stack Overflow](https://stackoverflow.com/questions/43572436/sort-an-array-of-objects-in-react-and-render-them)
```
// ... rest of code
// copy your state.data to a new array and sort it by itemM in ascending order
// and then map
const myData = [].concat(this.state.data)
.sort((a, b) => a.itemM > b.itemM ? 1 : -1)
.map((item, i) =>
<div key={i}> {item.matchID} {item.timeM}{item.description}</div>
);
// render your data here...
```
示例: