title: Sort based on array length within array of objects in Angular JS
body: <p>Consider the following example, </p>
  
  <pre><code>var arrayOfObject = [
  {name: 'ron', data: [1,3,5]},
  {name: 'raj', data: [2,3]},
  {name: 'roy', data: [1]}
  ]
  </code></pre>
  
  <p>In the view, I need to sort the objects in ascending order based on the length of <code>data</code> array in each objects.</p>
  
  <p>In the above example roy, raj, ron.</p>
  
  <p>I could always loop through the array, find the length and sort it, But was wondering if there was a way to sort it using <strong>Angular's OrderBy Filter</strong> (view or controller).</p>
  
  <p>Thanks,</p>