E
E
Egor2014-06-06 13:20:44
HTML
Egor, 2014-06-06 13:20:44

How to send an array from a form. Node.js + Express 4.0

Good afternoon.
I use Node.js + Express 4.0
There is a form of such look.

<form action="/profile/edit" method="post">
<input type="text" name="[profile][first_name]"/>
 <input name="[profile][surname]" type="text"/>       
<input type="submit" value="Отправить">
</form>

It is sent without using js, i.e. simply through the Submit button.
On the server side, I want to get a JSON object of the form
{
     profile:[
          first_name:"Some value",
          surname:"Some value"
     ]
}

Can this be done, and if so, how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor, 2014-06-06
@ByKraB

Balbes I.
Wrong name filled in and I'm surprised that nothing works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question