title: How to perform case sensitive sorting in angular?
body: <pre><code>array = [{&quot;id&quot;:1, &quot;name&quot;:&quot;aabc&quot;},{&quot;id&quot;:2, &quot;name&quot;:&quot;Dog&quot;},{&quot;id&quot;:3, &quot;name&quot;:&quot;James&quot;},{&quot;id&quot;:4,&quot;name&quot;:&quot;A1&quot;},{&quot;id&quot;:5, &quot;name&quot;:&quot;112&quot;}{&quot;id&quot;:6, &quot;name&quot;:&quot;Arjun&quot;},{&quot;id&quot;:7, &quot;name&quot;:&quot;ball&quot;}, {&quot;id&quot;:8, &quot;name&quot;:&quot;john&quot;}]
  </code></pre>
  <p>I tried this one.</p>
  <pre><code>array.sort((a,b) =&gt; a.name.toLocaleLowerCase().localCompare(b.name.toLocaleLowerCase());
  </code></pre>
  <p>but it is not showing the expected output</p>
  <pre><code>expected output = [{&quot;id&quot;:1, &quot;name&quot;:&quot;112&quot;},{&quot;id&quot;:2, &quot;name&quot;:&quot;A1&quot;},{&quot;id&quot;:3, &quot;name&quot;:&quot;Arjun&quot;},{&quot;id&quot;:4, &quot;name&quot;:&quot;Dog&quot;},{&quot;id&quot;:5, &quot;name&quot;:&quot;James&quot;},{&quot;id&quot;:6, &quot;name&quot;:&quot;aabc&quot;},{&quot;id&quot;:7, &quot;name&quot;:&quot;ball&quot;},{&quot;id&quot;:8,&quot;name&quot;:&quot;john&quot;}]
  </code></pre>
  <p>Kindly help me.</p>