I'm trying to send array using ajax, imagine the array
var anotherOne = 'anotherOneData';
var documents = ['banana', 'apple', 'monkey'];
I sent these normal value and array to server-side, using ajax, no problem with got this in server side,
console.log(req.body);
//result (anotherOne is I sent too, this is not array,)
{ anotherOne : 'anotherOneData',
'documents[]':
[ 'banana',
'apple,
'monkey' ] }
How can I access documents's first element?
req.body.documents[0] // not working
req.body.documents[0][0] // not working
req.body.documents instanceof Array // false : why?
I'm totally couldn't get what's going on, Please help me.