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

100
Views
Crear un valor clave par en una matriz anidada

¿Cómo creo otro valor clave par en una matriz anidada que sea única en esta función de mapa? los data variables también tendrían la clave

 let data = props.json_logs.json_logs?.map?.((item, X) => ({ ...item, id: item._id + X, }));

el json_logs se ve así:

 json_logs: Array(13) 0: {_id: '628905742650b2d5a1641f8f', Hostname: 'TT', Results: [{ something: 'something' },{ something: 'something'} ]} 1: {_id: '628cdc277a208e5e39c8bb80', Hostname: 'GG', Results: [{ something: 'something' }]} 2: {_id: '628cdc357a208e5e39c8bb82', Hostname: 'FF', Results: [{ something: 'something' }]}

Estoy tratando de poner una identificación: par de valores en la matriz de resultados, pero también mantengo la otra identificación en la función de mapa anterior

Así que debería verse así

 json_logs: Array(13) 0: {_id: '628905742650b2d5a1641f8f', Hostname: 'TT', Results: [{id:'628cdbb67a208e5e39c8bb7', something: 'something' },{id:'628cdbb67a208e5e39c8bb7b', something: 'something'} ]
about 4 years ago · Juan Pablo Isaza
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!