title: reactjs - display records in sorted order based on date field mongodb
body: <p>Am fetching records from mongodb and displaying it in reactjs. I want to render those records in sorted order on date field. Please suggest me.</p>
  
  <p>Am not using mongoes. Only Reactjs and mongodb. </p>
  
  <pre><code>class SearchResultsList extends React.Component {
  constructor(props) {
  super(props);
  this.state = { };
  }
  
  render() {
  return (&lt;tbody&gt;{ this.props.items.map((item) =&gt; &lt;SearchResults key={ item.id 
  } item={ item } open={ this.props.open } /&gt;) }&lt;/tbody&gt;);
  }
  }
  
  class SearchResults extends React.Component {
  constructor(props) {
  super(props);
  this.state = { };
  }
  
  render() {
  return (
  &lt;tr onClick={ this.handleOpen } style={{color: 'blue',fontsize: '12',cursor: 
  'pointer'}}&gt;
  &lt;td&gt;{ this.props.item.OrderNumber }&lt;/td&gt;
  &lt;td&gt;{ this.props.item.Assignee }&lt;/td&gt;
  &lt;td&gt;{ this.props.item.Status }&lt;/td&gt;
  &lt;td&gt;{ this.props.item.OrderDate }&lt;/td&gt;
  &lt;td&gt;{ this.props.item.CreatedDate }&lt;/td&gt;
  &lt;/tr&gt;
  );
  }
  </code></pre>