title: AngularJS orderBy a column containing a list
body: <p>is it possible to use orderBy with something other than strings and numbers?</p>
  
  <p>I have a list of customers and one of the columns contains an array of values (list of urls). I want to order by the url list, i.e. the first url in the list.</p>
  
  <p>I thought the array would maybe be automatically converted to a string. I also tried using providerUrls[0] as orderBy criteria.</p>
  
  <p>I know I could write my own sorting function but if there is a simple solution for this I would like to learn how to use it.</p>
  
  <p>This is a reduced example of my code:</p>
  
  <pre><code>&lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;p data-ng-click="sortBy = providerUrls; sortReverse = !sortReverse;"&gt;
                      URLs
                      &lt;span data-ng-show="sortBy === providerUrls &amp;&amp; !sortReverse"&gt;
                          &lt;img src="arrow-down.svg"/&gt;
                      &lt;/span&gt;
                      &lt;span data-ng-show="sortBy === providerUrls &amp;&amp; sortReverse"&gt;
                          &lt;img src="arrow-up.svg"/&gt;
                      &lt;/span&gt;
                  &lt;/p&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr data-ng-repeat="provider in providerFilter = (providers | orderBy:sortBy:sortReverse) track by $index"&gt;
              &lt;td&gt;
                  &lt;p data-ng-repeat="url in provider.urls track by $index"&gt;
                      {{url}}
                  &lt;/p&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>My data structure:</p>
  
  <pre><code>var a = {
      providerId: "a",
      providerUrls: ["abc", "def", "ghi"]
      // more properties
  };
  // b and c similar
  
  $scope.providers = [a, b, c];
  </code></pre>