title: Sort array with lodash by value (integer)
body: <p>I'm really struggling on that but I cannot find a solution.</p>
  
  <p>I have an array and I want to sort it by value (all integers).
  I thought, well let's use lodash, there sure must be a handy function for that.</p>
  
  <p>Somehow I cannot figure out to do this though.</p>
  
  <p>So far I got this:</p>
  
  <pre><code>myArray = [3, 4, 2, 9, 4, 2]
  </code></pre>
  
  <p>I got a result if I used this code:</p>
  
  <pre><code>myArray = _(myArray).sort();
  </code></pre>
  
  <p>But unfortunately the return value does not seem to be an array anymore. myArray.length is undefined after the sorting.</p>
  
  <p>I found thousands of examples of lodash sorting array but always via key.
  <a href="https://lodash.com/docs#sortBy" rel="noreferrer">https://lodash.com/docs#sortBy</a></p>
  
  <p>Can somebody tell my how I can get the following return result as an array?:</p>
  
  <pre><code>[2, 2, 3, 4, 4, 9]
  </code></pre>
  
  <p>It can't be that difficult, but somehow I don't get it done...</p>
  
  <p>Also sometimes I think that lodash documentation is a little complex.
  I'm probably just missing out an important detail...</p>