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

121
Vistas
HTML Post Form group data into dictionary

I have this object:

{
   "foo1":"value",
   "values": {
       "foo2":"value",
       "foo3":"value"
   }
}

And this object corresponds to a form (pug):

form(action="/foo",method="POST")
    p Foo:
        input(type="text", name="foo1", value="value2")
    table
        tbody
             tr
                  td
                       input(type="text", name="foo2", value="value2")
                  td
                       input(type="text", name="foo3", value="value2")
    input(type="submit",value="Submit")

When the form is submitted it gives me the data:

{
   "foo1":"value2",
   "foo2":"value2",
   "foo3":"value2"
}

Here's the question: Is there any way I can map the result to the original data structure, short of manually assigning each one?

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