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

113
Vistas
How to pass NULL value in fetch to backend for update?

In my React Native 0.66 app, here is the fetch used to update backend db:

let update = {
  status:"BidPlaced",
  buyer_id:Null, //<<==how to pass NULL for update?
  buy_date:NULL,  //<<==how to pass NULL for update?
};


res = await fetch(url, {. 
  method: "POST",
  headers: {
    'Accept': 'application/json, text/plain',
    'Content-Type': 'application/json',   
  },
  body: JSON.stringify(update), 
});

there is a need to pass NULL value in fetch to back end (nodejs + sequelize/postgres) for update. I notice if empty string is used buyer_id: , buy_date: , then JSON.stringify will omit them since there is no value provided for both buyer_id and buy_date. What is the right way to send NULL in fetch to update back end which is nodejs and sequelize/postgres?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

you need to use null not NULL or Null

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