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?