I am using server side javascript with node.js. Is it possible to make a form input name in html like this:
<input name="name.first">
<input name="name.last">
to get this js object on server side?
req.body = {
name: {
first: "firstname",
last: "lastname"
}
}
Actually I get not the "name" object with children "first" and "last", but:
'realname.first': 'firstname',
'realname.last': 'lastname',
...
Problem of node.js??
SOLUTION:
Like Eero Otsus said, I had to set brackets, not a period. For example:
<input name="name[first]">
Thanks a lot.