title: While sorting lower case and upper case letters are treated seperately
body: <p>While sorting String field</p>
  <ul>
  <li>If field is empty then it should go at the top in desc and at the bottom in asc (This is working fine)</li>
  <li>For Integer behaviour is fine (It considers null/undefined values and do sorting)</li>
  </ul>
  <p><strong>Only problem is with 'Case sensitivity'</strong></p>
  <blockquote>
  <ul>
  <li>It should treat 'rosy' And 'Rosy' as same and display them on after another</li>
  </ul>
  </blockquote>
  <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 dynamicsort(property,order) {
      var sort_order = 1;
      if(order === "desc"){
          sort_order = -1;
      }
      return function (a, b){
          //check if one of the property is undefined
          if(a[property] == null){
                  return 1 * sort_order;
          }
          if(b[property] == null){
                  return -1 * sort_order;
          }
          // a should come before b in the sorted order
          if(a[property] &lt; b[property]){
                  return -1 * sort_order;
          // a should come after b in the sorted order
          }else if(a[property] &gt; b[property]){
                  return 1 * sort_order;
          // a and b are the same
          }else{
                  return 0 * sort_order;
          }
      }
  }
  let employees = [
      {
          firstName: 'John11',
          age: 27,
          joinedDate: 'December 15, 2017'
      },
      {
          firstName: 'john22',
          lastName: 'rosy',
  
          age: 44,
          joinedDate: 'December 15, 2017'
      },
  {
          firstName: 'SSS',
          lastName: 'SSSS',
          age: 111,
          joinedDate: 'January 15, 2019'
      },
      {
          firstName: 'Ana',
          lastName: 'Rosy',
          age: 25,
          joinedDate: 'January 15, 2019'
      },
  
      {
          firstName: 'Zion',
          lastName: 'Albert',
          age: 30,
          joinedDate: 'February 15, 2011'
      },
      {
          firstName: 'ben',
          lastName: 'Doe',
          joinedDate: 'December 15, 2017'
      },
  ];
  
  console.log("Object to be sorted");
  console.log(employees);
  
  console.log("Sorting based on the lastName property")
  console.log(employees.sort(dynamicsort("lastName","desc")));
  console.log("Sorting based on the lastName property")
  console.log(employees.sort(dynamicsort("lastName","asc")));</code></pre>
  </div>
  </div>
  </p>