In our react application, we are posting json string entered in a text area, to an express router function. In the client we are using axios to post the data to express router.
We do receive the data in the express router function like :
const reqData = request.body
But when we inspect the data which is received in the router function, the json we are passing is wrapped with another curly braces:
{{"user":"emp","comapany":"acme"}}
The outer braces are added automatically it seems and because of this, JSON.parse is failing.
Is there a way to avoid this?