Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
getting [Object object] instead of String in node.js request

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. enter image description here 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. enter image description here

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!