title: How to iterate using the timestamp from an array of objects in react
body: <p>I am new to the <code>react-redux.</code>. Here I have an response which is like ,</p>
  
  <pre><code>{
          "content": [{
              "id": "5b7d4a566c5fd005075051"
              "createdAt": 12345677,,
              "Name": "abc"
          },
          {
              "id": "5b7d4a566c5fd005075051"
              "createdAt": 12235677,
          },
          {
              "id": "5b7d4a566c5f0507501051"
              "createdAt": 123675677,
          }]
      }
  </code></pre>
  
  <p>Now, with this data I am creating a table which looks like,</p>
  
  <pre><code>{this.props.data &amp;&amp; this.props.data.content &amp;&amp; this.props.data.content.length &gt; 0 &amp;&amp; this.props.data.content.map((item, key) =&gt; {
                return (
                  &lt;tr key={key}&gt;
                    &lt;td className="font-weight-bold wc-30"&gt;{key + 1}&lt;/td&gt;
                    &lt;td&gt;{item.Name}&lt;/td&gt;
                  &lt;/tr&gt;
                )
              })}
  </code></pre>
  
  <p>Now, I do have that <code>createdAt</code> which is the <code>timeStamp</code>. So, I want to render this table in <code>ascending order</code>. Like, which ever is created at latest will be at the first place .</p>
  
  <p>So, I tried with one </p>
  
  <pre><code>const sortedList = this.props.data.sort((a, b) =&gt; b.createdDate - a.createdDate); 
  </code></pre>
  
  <p>But, I was not getting there. So, Can any one help me with this ?</p>