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

96
Views
How to parse JSON assigned to a variable in POST request?

I am trying to set a webhook for a payment system. Although, they keep sending invalid JSON data with content-type "application/json" headers.

Since I have set express with app.use(express.json()), whenever they make a POST request I'm unable to parse the data and the server errors.

This is what they're trying to send:

data={
  "return": {
    "orders": [
      {
        "order": {}
      }
    ]
  }
}

As you can see: it's JSON content assigned to a variable.

How do I deal with that, in order to have access to the actual JS object?

about 4 years ago · Juan Pablo Isaza
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!