title: Sort row Reactjs
body: <p>Data is fetching from json and show in table.</p>
  
  <p>specific  should be able to sort the row</p>
  
  <pre><code> &lt;th onClick={() =&gt; this.sortColumn('point')} &gt;{this.pointLabel}&lt;/th&gt;
  
  function sortColumn(column) {
    if(column === this.sortColumnName) {
      this.sortOrder = !this.sortOrder;
    } else {
      this.sortColumnName = column;
      this.sortOrder = true;
    }
    this.renderLabels(column);
    let sortItems = this.state.items;
    console.log(sortItems);
    let a, b;
    if(this.sortOrder === true) {
      a = -1;
      b = 1;
    } else {
      a = 1;
      b = -1;
    }
    console.log(a);
    sortItems.sort((first,second,column)=&gt; {
      if(a[column] &lt; b[column]){
        return a;
      }
      if(a[column] &lt; b[column]) {
        return a;
      }
    })
    this.setState({
      items: sortItems
    })
  }
  </code></pre>
  
  <p>value of a changing from 1 to -1
  but seems i am missing something, which cause not function properly</p>