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

234
Views
¿Cómo convertir una matriz de matrices de objetos en una matriz de matrices en Angular?
[[{ id: 26, type: "Source", name: "Email" }], [{ id: 27, type: "Source", name: "Id" }, { id: 29, type: "Divider", name: "+" }, { id: 30, type: "Source", name: "SupplierId" }], [{ id: 28, type: "Source", name: "CommunityId" }]

¿Cómo convierto esta matriz de matriz de objeto anterior en una matriz de matrices como esta donde se destaca el "nombre"?

 [["Email"],["Id","+", "SupplierId"],["CommunityId"]]

Ya he intentado mapearlo así:

 this.exportColumns = columns.flatMap(obj => obj.sourceColumn).map(obj => obj?.name);

pero obtengo este resultado:

 [ "Email", "Id", "+", "SupplierId", "CommunityId" ]
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

use el segundo mapa dentro de la primera capa de matrices

 data.map(item => item.map(i => i.name));
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!