title: Trying to sort array by numbers first and then letters last
body: <p>I am trying to sort an array. I am trying to sort by "itemCommodity". I need to sort by numbers only first and then numbers with letters last. For example:</p>
  
  <p>1000
  A120
  B330
  2020
  J954
  5000</p>
  
  <p>Should be displayed as:</p>
  
  <p>1000
  2020
  5000
  A120
  B330
  J954</p>
  
  <p>I hope someone can help me out with this. I have an example of what i was trying below but it does not work as expected.</p>
  
  <pre><code>var product_data = [{
  "itemCommodity": "1000",
  },
  {
  "itemCommodity": "B330",
  },
  {
  "itemCommodity": "A120",
  },
  {
  "itemCommodity": "J954",
  },
  {
  "itemCommodity": "5000",
  },
  {
  "itemCommodity": "2020",
  }]
  
   product_data.sort(function(a, b) {
       return a.itemCommodity - b.itemCommodity;
   });
  </code></pre>
  
  <p>Please note that itemCommodity is not the only object in the array. I have about 40 different objects, just trying to sort on itemCommodity.</p>