title: Sort array by specific array objects column
body: <p>Tried to sort array objects per specific array column, in my case, i tried to sort it by 'title' but it does not work, I want to sort it alphabetically, refer below</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(function(){
   
    var arr = [];
    
    $('table tbody tr').each(function(){
     
      arr.push({ title : $.trim($(this).find('td:first-child').text()), column : $(this).index() });
      
    });
   
    
  arr.sort(function(a,b){
     return a.title - b.title
   });
   
   console.log(arr);
   
    
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  
  
  &lt;table class="table-bordered table table-responsive table-striped table-b34d4e"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Course&lt;/th&gt;
              &lt;th&gt;Level&lt;/th&gt;
              &lt;th&gt;Trainer&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;a target="_blank" href="appointment-of-agents-and-salesperson.html"&gt;
                   Law Pertaining to Appointment of Real Estate Agent &amp; Salesperson (C1L1S0014)
                  &lt;/a&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  1
              &lt;/td&gt;
              &lt;td&gt;
                  Celeste Ng
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;a target="_blank" href="conflict-of-interest-and-how-to-avoid-them.html"&gt;
                   Conflict of Interest and How to Avoid Them (C1L1S0004)
                  &lt;/a&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  1
              &lt;/td&gt;
              &lt;td&gt;
                  Celeste Ng
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;a target="_blank" href="understanding-the-estate-agents-act.html"&gt;Understanding the Estate Agent Act (C1L1S0023)&lt;/a&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  1
              &lt;/td&gt;
              &lt;td&gt;
                  Celeste Ng
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;a target="_blank" href="art-of-effective-negotiation-and-closing.html"&gt;Art of Effective Negotiations and Closing (C1L1S0598)&lt;/a&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  1
              &lt;/td&gt;
              &lt;td&gt;
                  Nicholas Nan
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;a target="_blank" href="attaining-service-excellence-in-real-estate-industry.html"&gt;Attaining Service Excellence in Real Estate Industry (C1L1S0563)&lt;/a&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  1
              &lt;/td&gt;
              &lt;td&gt;
                  Chris Koh
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;a target="_blank" href="cea's-disciplinary-cases-2015.html"&gt;CEA's Disciplinary Cases 2015 (C1L1S0553)&lt;/a&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  1
              &lt;/td&gt;
              &lt;td&gt;
                  Celeste Ng
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;a target="_blank" href="law-pertaining-to-appointment-of-real-estate-agent-and-salesperson.html"&gt;Law Pertaining to Appointment of Real Estate Agent &amp; Salesperson (C1L1S0014) &lt;/a&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  1
              &lt;/td&gt;
              &lt;td&gt;
                  Celeste Ng
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;a target="_blank" href="duties-of-tenants-agent-with-case-studies-on-private-residential-properties.html"&gt;Duties of Tenant’s Agent with Case Studies on Private Residential Properties (C1L20582)&lt;/a&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  2
              &lt;/td&gt;
              &lt;td&gt;
                  Celeste Ng
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;a target="_blank" href="duties-of-landlords-agent-with-case-studies-on-private-residential-and-commercial-properties.html"&gt;Duties of Landlord’s Agent with Case Studies on Private Residential and Commercial Properties (C1L2S0365)&lt;/a&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  2
              &lt;/td&gt;
              &lt;td&gt;
                  Celeste Ng
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>any help, ideas please?</p>