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

367
Views
convertidor de diccionario a tabla

[ingrese la descripción de la imagen aquí] [1] Tengo un archivo json que voy a usar como base de datos. Los diccionarios son diferentes, algunos de ellos tienen más diccionarios infantiles. Tengo que imprimir todos los artículos con precio y cantidad. también tengo que imprimir en la tabla su precio total como en la imagen de abajo. [ingrese la descripción de la imagen aquí][2] [1]: https://i.stack.imgur.com/pmgqC.png [2]: https://i.stack.imgur.com/OseLv.png

 function checkNextObject(check) { var c = Object.keys(check); if (typeof check[c[0]] === "object") { var cc= Object.keys(c) return typeof c[cc[0]] === "object" ; } else return false; } function recursiveTable(dictObject,parent= {"name":"","total":0},child={},table={"items":[],"coutner":0}) { var keys = Object.keys(dictObject); keys.forEach(key => { if (checkNextObject(dictObject)) { return recursiveTable(dictObject[key],parent,child,table); } else { var row = {key:dictObject[key],"parents":parent} table["items"].push(row) } }) ; return table; }
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!