title: json data not display in ng grid in angular js?
body: <p>I am working on one project which is based on EJB, AngularJS, restful web services and JPA.</p>
  
  <p>I have created a web service and it will return data from database in JSON format to client.</p>
  
  <p>At client side, I want to display this JSON data in <code>ng-grid</code> but the data not getting displayed.</p>
  
  <p>Below is my code:</p>
  
  <p><strong>JS code</strong></p>
  
  <pre><code>dashboard.controller('MainController', function($scope, $http) {
      $http.get('http://localhost:8080/WebApplication2/rest/testentity').
      success(function(data) {
          $scope.mydata = data;
          console.log("data response : " + $scope.mydata);
      });
      $scope.gridOptions = {
          data: $scope.mydata,
          enableRowSelection: false,
          enableCellEditOnFocus: true,
          multiSelect: false,
          columnDefs: [{
                  field: 'id',
                  displayName: 'id',
                  enableCellEdit: false
              },
              {
                  field: 'testname',
                  displayName: 'testname',
                  enableCellEdit: false
              },
              {
                  field: '',
                  displayName: 'Save',
                  enableCellEdit: false,
                  cellTemplate: '&lt;button id="editBtn" type="button"  ng-click="saveItem(row.entity.testname)" &gt;Save&lt;/button&gt;'
              }
          ]
      };
  });
  </code></pre>
  
  <p>In the console, it will display proper data</p>
  
  <p><strong>console Output</strong> </p>
  
  <pre><code> data response : [object Object],[object Object]
  </code></pre>
  
  <p>Please suggest what is wrong with my code.</p>