title: Sort object key value by arrays length
body: <p>I have an object named languages : </p>
  
  <pre><code> ► JAVA : Array[1]
   ► C : Array[2]
   ► C#: Array[4]
   ► C++: Array[1]
  </code></pre>
  
  <p>I would like to sort this object by length (Desc) of each array :</p>
  
  <pre><code>► C#:Array[4]
  ► C:Array[2]
  ► JAVA:Array[1]
  ► C++:Array[1]
  </code></pre>
  
  <p>I have tried according to <a href="https://stackoverflow.com/questions/2301856/how-to-sort-an-array-of-objects-based-on-a-the-length-of-a-nested-array-in-javas#answer-2301880">this</a></p>
  
  <pre><code>    function myAbcSort(a,b){
          if(a.length&gt;b.length){
              return -1;
          }
          else if (a.length&lt;b.length){
              return 1;
          }
          else return 0
      }
      languages.sort(myAbcSort);
  </code></pre>
  
  <p>I'm getting : </p>
  
  <pre><code>languages.sort is not a function
  </code></pre>