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

190
Views
How to update JSONArray in json column for postgres?

I receive a naked JSON array for changes from the request body like

"event": {
        "date": "2022-06-08",
        "stime": "9:00 am",
        "Status": "confirmed",
        "id": "3a207381-0007-47b7-a4dd-bbbe44afcf18",
    },
    "changes": [
        "date",
        "time"
    ]
}

I want changes to be updated in the JSON column(update_change) in my table.

I am accessing changes in the request body with

var update_change = JSON.stringify(req.body.changes)

and passing to the Postgres query.

  const query = `UPDATE events SET update_change =$1 WHERE id = $2`;
  var values = [update_change,id];

Query receives update_changes is undefined.

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!