title: AngularJS display JSON data in table
body: <p>I am using AngularJS with RESTAPI, I am able to get the customers data sent from server in a JSON format. My Angular code snippet as below:</p>
  
  <pre><code>  app.factory("services", ['$http', function($http) {
    var serviceBase = '/api/album';
      var obj = {};
      obj.getCustomers = function(){
          return $http.get(serviceBase);
      };
      return obj;   
  }]);
      app.controller('listCtrl', function ($scope, services) {
  services.getCustomers().then(function(data){
      alert(JSON.stringify(data.data));
      $scope.customers = data.data;
      });
  });
  </code></pre>
  
  <p>Here is my JSON data:</p>
  
  <pre><code>{
  "data": [
      {
          "id": "1",
          "artist": "Gotye75",
          "title": "Making  Mirrors7"
      },
      {
          "id": "100",
          "artist": "ytttt5",
          "title": "1231"
      },
      {
          "id": "101",
          "artist": "65",
          "title": "565444555"
      },
      {
          "id": "102",
          "artist": "6",
          "title": "6"
      },
      {
          "id": "103",
          "artist": "y",
          "title": "yy"
      },
      {
          "id": "104",
          "artist": "ty",
          "title": "yt"
      },
      {
          "id": "109",
          "artist": "ytrer",
          "title": "yt"
      }
      ]
  }
  </code></pre>
  
  <p>I am able to display the JSON data in table if my JSON does not contain the "data" hear. However if my jSON data comes with "data" header, it is unable to display. I am asking, what are the solution in Angular to parse the JSON object. </p>
  
  <p>For example if it is in BackboneJS, i can simply do </p>
  
  <pre><code>    parse: function (response) {
      //alert(JSON.stringify(response.data));
      return response.data;
  }
  </code></pre>
  
  <p>How can i do it in Angular?</p>