My frontend (JS) is sending a request to my backend (Node Typescript) with FormData (because the FormData consist of images too) as below:-
In my Node project, I am currently using express-fileupload (npm) so when I log the req.body the result I get is this:-
This makes it hard to access the object as I have to do req.body['items[0][item][id]'] instead of req.body.items[0].item.id. Is there a way to easily format the req.body into accessible like a JSON object like below?
{
orderNo: "A00006",
items: [
{
item: {
_id: "60dfkwakawn1",
status: 1,
model: {
...
},
...
}
...
}
],
...
}

