I am having a slight issue here, I am working on a project (already built), but there's a slight issue in it, that is whenever I type a name or string that is not in the database and try to log it (after hitting send request button) using console.log(req.body.connection) or console.log(JSON.stringify(req.body.connection[0]), it prints this
connection:
'[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]'
instead of "xyz@gmail.com" or "someRandomString" (the string that I entered and hit the send request button).
You can see in this image that I am typing a random string sfsfsf and in payload it gives me that same [Object object] in connection property, it should be sfsfsf string in place of that.
Can someone tell me why is this? And how can I resolve this problem? I would really appreciate the help.
Edit: If seeing the code explains better, then here it is. Notice that I am getting connection : "[object Object]" as string. 