Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

276
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda