title: How to sort a two-dimensional array (2d array) by date in ruby on rails?
body: <p>I have a two dimensional array which has following structure</p>
  
  <pre><code>array = [
            ["2019-03-11","00986587","LBP"],
            ["2019-02-23","00462421","USD"],
            ["2019-05-26","00357853","EUR"],
            ["2019-09-15","00357382","LBP"]
          ]
  </code></pre>
  
  <p>I want to sort the array based on the date (first element of each row).</p>
  
  <p>Looking for the following result:</p>
  
  <pre><code>array = [
            ["2019-09-15","00357382","LBP"],
            ["2019-05-26","00357853","EUR"],
            ["2019-03-11","00986587","LBP"],
            ["2019-02-23","00462421","USD"]
          ]
  </code></pre>
  
  <p>After my research on <strong>sort</strong> and <strong>sort_by</strong> i didn't find any solution.
  Can anyone please help me to solve my problem ? and thank you </p>