title: AngularJS $resource query returns array with a function in it, which is not does not fit well when iterating through data
body: <p>I have added a custom Array.prototype.functionName to my js file. I am using AngularJS 1.2.3
  and when I call $resource to return a query, it appends that custom function in the response array. when i iterate over the response array, it return exceptions when parsing the custom function, that is what i believe. Can anyone suggest me how to work around this problem</p>
  
  <pre><code>Array.prototype.functionName = function(){
      //sorting
  }
  </code></pre>
  
  <p>I call my $resource like this in my service</p>
  
  <pre><code>return $resource('/url',{},{
      'List':{
           method: 'GET',
           isArray: true
      }
  });
  </code></pre>
  
  <p>and call it in my controller</p>
  
  <pre><code>returnResource.List().$promise.then(function(Data){
      console.log(Data); //Data has my custom function append at the end
      for(var i in Data){
          //do something
      }
  });
  </code></pre>