title: Sort an array except one element in JavaScript
body: <p>I have an array and I am sorting it but I need to sort everything except one element of my array.</p>
  
  <p>My array is:</p>
  
  <pre><code>var Comparison = [
      {key: "None", value: "None"},
      {key:"Geographical Area", value:"Geographical_Area"},
      {key:"Forests", value:"Forests"},
      {key:"Barren Unculturable Land", value:"Barren_Unculturable_Land"},
      {key:"Land put to Non agricultural use", value:"Land_put_to_Non_agricultural_use"},
      {key:"Land Area", value:"Land_Area"},
      {key:"Water Area", value:"Water_Area"},
      {key:"Culturable Waste", value:"Culturable_Waste"},
      {key:"Permanent Pastures", value:"Permanent_Pastures"},
      {key:"Land under Tree Crops", value:"Land_under_Tree_Crops"},
      {key:"Fallow Land excl Current Fallow", value:"Fallow_Land_excl_Current_Fallow"},
      {key:"Current Fallow", value:"Current_Fallow"},
      {key:"Total Unculturable Land", value:"Total_Unculturable_Land"},
      {key:"Net Sown Area", value:"Net_Sown_Area"},
      {key:"Gross Sown Area", value:"Gross_Sown_Area"},
      {key:"Cropping Intensity", value:"Cropping_Intensity"} ];
  </code></pre>
  
  <p>I am sorting this array using this code:</p>
  
  <pre><code>var Comparison_sort = this.Comparison.sort(function (a, b) {
    if (a.key &lt; b.key)
        return -1;
    if (a.key &gt; b.key)
        return 1;
    return 0;
  });
  </code></pre>
  
  <p>This is sorting my array perfectly, but I want one of my elements to be on top, meaning my element None should be on top and sort all other elements.</p>
  
  <p>For example, I am getting this result:</p>
  
  <pre><code>   {key: "Barren Unculturable Land", value: "Barren_Unculturable_Land"}
     {key: "Cropping Intensity", value: "Cropping_Intensity"}
     {key: "Culturable Waste", value: "Culturable_Waste"}
      ....
     {key: "None", value: "None"}
  </code></pre>
  
  <p>But I want a result like this:</p>
  
  <pre><code>   {key: "None", value: "None"}
     {key: "Barren Unculturable Land", value: "Barren_Unculturable_Land"}
     {key: "Cropping Intensity", value: "Cropping_Intensity"}
     {key: "Culturable Waste", value: "Culturable_Waste"}
      ....
  </code></pre>
  
  <p>I saw an answer, <em><a href="https://stackoverflow.com/questions/50491071/sort-an-array-except-one-item-using-typescript">Sort array in TypeScript</a></em>, but I was unable to use this answer to my problem.</p>