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

197
Vistas
How to show the key and the values of my JSON on Angular?

`my code is this: *ngFor="let m of Markets | keyvalue">{{m.key | json}} {{m.value | json}}

the problem is that the key is 0,1,2,3,4,5 not TMALL and JD and the value is tmall and all the array that is inside so i want to separate that.

It's a strange problem because the JSON of the database is this one: [{"tmall":["vino","aceite","chocolate","lacteos","cafe","cerveza","bebidas","licores","comida para bebe","conservas"]}, {"JD":["vino","aceite","chocolate","lacteos","cafe","cerveza","bebidas","licores","comida para bebe","conservas"]}

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

0

your model is a list, not a map. You should nest two ngFor, one regular and another one with | keyvalue

<div *ngFor="let m1 of Markets">
    <div *ngFor="let m2 of m1 | keyvalue">{{m2.key | json}} {{m2.value | json}}></div>
</div>
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