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

291
Views
¿Cómo crear un esquema JSON reduciendo objetos y eliminando campos innecesarios?

Tengo un problema al convertir una matriz de objetos Javascript en JSON. Durante la conversión en JSON, solo quiero tener valores en cuestión.

El objeto que necesita ser convertido

 [ { "id": "29705f44114", "name": "Object", "defaultValue": false, "title": "Object", "child": [ { "id": "9705f44114e", "name": "List", "defaultValue": false, "title": "List", "child": [ { "id": "5f44114e0ee", "name": "String", "defaultValue": false, "title": "Object" }, { "id": "4114e0eeb30", "name": "Number", "defaultValue": 0, "title": "Number" } ] }, { "id": "705f44114e0", "name": "Object", "defaultValue": false, "title": "Object", "child": [ { "id": "44114e0eeb3", "name": "List", "defaultValue": false, "title": "List" } ] }, { "id": "05f44114e0e", "name": "Object", "defaultValue": false, "title": "Object" } ] }

]

quiero que se convierta en algo asi

 Object: { List: [ Object, Number ], Object: { List: [] }, Object: {} }

Si un objeto viene dentro de otro objeto, entonces debe tener un valor de {}, si viene debajo de la lista, entonces basta con escribir el objeto

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!