I'm quite new to NodeRed. I'm trying to update a MySQL database using HTTP.
I'm using Postman as an HTTP client, sending a PUT request as follows:
var obj = msg.payload;
var id =obj["id"];
msg.topic = "update biblioteca set estado='"+estado+"' where id="+id+";";
However, when sending the request in Postman, I get the following error:
TypeError: Cannot read property 'id' of undefined
I'm sure the database and Postman are working properly, since the table is updated correctly when typing the values of "estado" and "id" manually in the funcion node code inesteado of extracting it from the object obj, so I must be doing something wrong when extracting the values of the fields.
Could it possibly be a bug in Node-Red? or am I doing something wrong?