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

149
Vistas
Populate html table or list with dynamic data from backend

I have a C# api endpoint that returns a List<Dictionary<string, object>>.

The problem here is this list is dynamic, so I cannot say what the elements could be so I could populate an html list (say with angular) with it, i.e.

<ul *ngFor="let data of dataList">
<li><span>{{data.propertyName}}<span/> -- <span>{{data.propertyValue}}<span/><li>
<ul>

Another data from the endpoint could have more data and different list properties, so instead of propertyName and propertyValue it could be employeeID, employeeName, dateOfBirth etc.

How do I populate the list with only one list markup and api endpoint?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If I understand your objective correctly, then in Angular you'll have the property:

dataList: object[]; // data model is unknown

In that case you can:

keys: string[];
...
this.keys = Object.keys(dataList[0]); // once data is retrieved you can extract its model

And in your HTML you can for example:

<ul *ngFor="let data of dataList">
    <li *ngFor="let prop of keys">
        <span>{{ prop }}: {{ data[prop] }} | <span/>
    <li>
<ul>
about 4 years ago · Juan Pablo Isaza Denunciar
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