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

219
Views
Crear un nuevo objeto a partir de datos y excluir valores dobles.

No pude encontrar una solución que funcione, pero estoy creando un nuevo objeto a partir de algunos datos dentro de un bucle, pero la fecha contiene valores dobles, por lo que debería evitar que esto se agregue al nuevo objeto. La propiedad de nombre solo debe contener valores únicos.

 public listOfItems: {[key: number]: {name: string; inStock: boolean}} = {}; dataAndStuff.forEach((item, i) => { this.listOfItems[i] = { name: item.itemName, instock: false, }; }); // output [ {name: 'audi', inStock: true} {name: 'bmw', inStock: true} {name: 'audi', inStock: true} {name: 'kia', inStock: true} ]
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!