Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

271
Views
How to access nested json with ng-repeat to build a table

I'd like to build a table that looks like that : table

I tried something in my dataset, but as datas are nested, I don't have any idea how I can display them with ng-repeat in my html.

Also resultsJ1,2,3 and listnqJ1,2,3 are lists so we have to be able to access the elements of the list

   
table = [
  { day: " Day1" , webservices : [
                  {ws: resultsJ1, tnq : listnqJ1 }
                  ]
  },
  { day: " Day2", webservices : [
                  {ws :resultsJ2, tnq : listnqJ2 }
                  ]
  },
  { day: " Day3" , webservices : [
    {ws :resultsJ3, tnq : listnqJ3 }
    ]
}
  ]

  $scope.listnqJ1 = tableau[0].webservices[0].tnq;
  $scope.listnqJ2 = tableau[1].webservices[0].tnq;
  $scope.listnqJ3 = tableau[2].webservices[0].tnq;



  $scope.resultsJ1 = tableau[0].webservices[0].ws;
  $scope.resultsJ2 = tableau[1].webservices[0].ws;
  $scope.resultsJ3 = tableau[2].webservices[0].ws;
    

self.tableau = tableau

I found that in my html, it works for the resultsJ1,2,3 lists but I have a huge problem displaying the results under Day 1, 2 , 3 : listnqJ1,2,3.

 <table cellpadding="20" rules="GROUPS" frame="BOX">
    <thead>
      <tr>
        <th>Web Service</th>
        <th style="width: 100px" ng-repeat="day in ctrl.tableau ">
          {{day.jour}}
        </th>
      </tr>
    </thead>
<tbody>
  <tr style="width: 100px" class="xl153" ng-repeat="ws in resultsJ1 track by $index">
    <td>{{ws}}</td>

    <td style="width: 100px" class="xl153" ng-repeat="day in ctrl.tableau" >
     
        <td
          style="width: 100px"
          class="xl153"
          ng-repeat="tnq in listnqJ1 track by $index"
        >
          {{tnq}}
        </td>
      </td>

  </tr>
  <tr  class="xl153" ng-repeat="ws in resultsJ2 track by $index">
    <td>{{ws}}</td>

</tbody>
  </table>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!