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?
you need to use null not NULL or Null