title: AngularJS, $http and transformResponse
body: <p>I'm getting a strange behaviour with AngularJS's $http and not really understanding how transformResponse works (the docs are a bit light on this one).</p>
  
  <pre><code>    WebAssets.get = function () {
          return $http.get('/api/webassets/list', {
              transformResponse: [function (data, headersGetter) {
                  // not sure what to do here?!
                  return data;
              }].concat($http.defaults.transformResponse) // presume this isn't needed, added for clarity
          }).then(function (response) {
              return new WebAssets(response.data);
          });
      };
  </code></pre>
  
  <p>The api returns an array of objects:</p>
  
  <pre><code>[{"webasset_name": "...", "application_id": "...", "etc": "..."}, ... ]
  </code></pre>
  
  <p>But when transformResponse has done it's evil business the data has transformed into an indexed object:</p>
  
  <pre><code>{"0":{"webasset_name":"...","application_id":"...", "etc": "..."}, "1":....}
  </code></pre>
  
  <p>I want to keep the original data structure (an array of objects).</p>