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

207
Views
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 answers
Answer question

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 Report
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!