title: Alphanumeric sort on first first three chars in the JSON object in javascript
body: <p>I wanted to sort the JSON object specific key values of first three characters.</p>
  
  <p><strong>Below is the sample JSON format</strong></p>
  
  <pre><code>var obj = [{
  id :12,
  trackingNo: 'APQW123'},
  {
  id :13,
  trackingNo: '123ABXU'},
  {
  id :12,
  trackingNo: '98012JIH'},
  {
  id :12,
  trackingNo: 'JHG567'}
  ];
  </code></pre>
  
  <p><strong>In above object, based on first three chars of trackingNo need to sort the object. trackingNo is combination of alphanumeric.</strong></p>
  
  <p>I tried the below method. I thought it is numeric sort.It not correct one for this alphanumeric.</p>
  
  <pre><code>function sortObject(obj) {
    var sortedData = obj.sort(function (a, b) {
  
      return a.trackingNo &gt; b.trackingNo;
  
    });
  
    return sortedData;
  }
  </code></pre>
  
  <p>Could anyone please provide the logic to implement the alphanumeric sort based on first three characters in jasscript.</p>