Cannot post array
theone3nu opened this issue · 2 comments
theone3nu commented
This is my post request with body as application/json format from postman
`{"title": "test",
"date": "March 12 12 pm",
"status": "Ongoing",
"users": ["1","2"]
}`
But in nodejs when i try to retrieve req.body users am getting only 1 as output but not whole array.
maitraysuthar commented
Can you please elaborate on which API you are trying?
theone3nu commented
Sorted the problem There is a bug in express validator https://stackoverflow.com/questions/60606552/unable-to-read-array-from-req-body-in-nodejs-express?noredirect=1#comment107225266_60606552