how to fix [Object: null prototype] { title: 'product' }

后端 未结 8 482
醉话见心
醉话见心 2020-12-15 05:02

I\'ve started learning node.js with express framework , when I post a form like this :

rout         


        
8条回答
  •  醉梦人生
    2020-12-15 05:41

    I recommmend to use the function JSON.parse like that:

    const form = JSON.parse(JSON.stringify(req.body)) console.log(form.title)

提交回复
热议问题