title: How do I loop through this Json object (angularJS)?
body: <p>I'm trying to loop through "tabs" in the Json object using AngularJS? How can I do it?</p>
  
  <pre><code>var model = {
      "$id": "1",
      "tabs": [{
          "$id": "2",
          "id": 2,
          "name": "Output",
          "layoutId": 1,
          "order": 1,
          "dashboardId": 1
      }, {
          "$id": "15",
          "id": 3,
          "name": "Yield",
          "layoutId": 1,
          "order": 2,
          "dashboardId": 1
      }, {
          "$id": "24",
          "id": 4,
          "name": "Trend",
          "layoutId": 1,
          "order": 3,
          "dashboardId": 1
      }],
      "id": 1,
      "name": "Test",
      "title": "Test",
      "description": "Test Dashboard",
      "createDate": "2015-06-08T00:00:00+01:00",
      "ownerId": 1,
      "enabled": true
  };
  </code></pre>
  
  <p>When I try this, I get "undefined" in the console.</p>
  
  <pre><code>angular.forEach(model.tabs, function (tab) {
      console.log(tab.name);
  });
  </code></pre>
  
  <p>not sure what I'm doing wrong?</p>
  
  <p>EDIT: 
  The data is coming from ASP.Net controller:</p>
  
  <pre><code>$http.get("/Dashboards/GetDashboardData").success(function (data) {
              model = data;
              angular.forEach(model.tabs, function (tab) {
                  console.log(tab.name);
              });
          }).error(function (data) {
              console.log("error");
          });
  </code></pre>