Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

108
Vistas
Serialize nested and recursive structure into flat one with references

clarification: this is a kind of software identification (and I dont know if it is allowed here)
A time ago I saw an app which has made use of a javascript library for transform nested objects into flat one like this

var a = {
  attr1: "some value",
  attr2: new Date(),
  b: {
    attr1: "some other value",
  }
}
a.b.a = a
transform(a)
/*
[{
  ref: 0,
  attr1: {
    type: "string",
    value: "some value"
  },
  attr2: {
    type: "Date",
    value: "2022-03-09T16:17:03.216Z"
  },
  b: {
    type: "ref",
    value: "1"
  }
 },{
  ref: 1,
  attr1: {
    type: "string",
    value: "some other value"
  },
  b: {
    type: "ref",
    value: "0"
  }
}]
*/

Does anyone know of a library or standard for do that?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda