Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

193
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda