title: Sort nested array of object in javascript
body: <pre><code>let arr = [{
    name: 'Apple',
    trades: [{
      date: '2017.01.01',
      volume: 100
    }, {
      date: '1995.02.01',
      volume: 150
    }, {
      date: '2008.01.01',
      volume: 250
    }]
  }]
  </code></pre>
  
  <p>Hello, I googled many documents for sorting nested object in JavaScript, but I couldn't find the way of my case and I struggled so many hours so I want to ask to how can I sort above array of objects.</p>
  
  <p>What I expected result is sort array of object by <code>trades.date</code> like this </p>
  
  <pre><code>sortedArray = [{
    name: 'Apple',
    trades: [{
      date: '2017.01.01',
      volume: 100
    }, {
      date: '2008.01.01',
      volume: 250
    }, {
      date: '1995.02.01',
      volume: 150
    }]
  }]
  </code></pre>
  
  <p>How can I do this? </p>