title: How can you sort rows in an array based on ascending column values?
body: <p>For example, if I have the following 2D array:</p>
  
  <pre><code>2   1   4
  1   2   3
  2   1   2
  </code></pre>
  
  <p>and want to sort by each row, how I can I use the column values to have ascending order? In this case I am able to sort the first column in the array, getting</p>
  
  <pre><code>1 2 3
  2 1 4
  2 1 2 
  </code></pre>
  
  <p>With this example, my final result should be this:</p>
  
  <pre><code>1 2 3
  2 1 2
  2 1 4
  </code></pre>
  
  <p>First I want to look at the first column, then sort rows. Since two rows begin with 2, I want to look at the second column, and sort. If those are still the same number, I want to look at the next column and so on. How should I do this?</p>