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

119
Views
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
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!