You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I posted to the node-red forum about an issue I'm having with persistence.
Basically, after a dataOut retrieval, the msg.payload contains the JSON data. I then modify a parameter, such as msg.payload.password, to return the query to the user (but with the password blanked out). This payload is NOT stored.
The next dataIn retrieval for the same query returns the modified in-memory version, instead of going to the values stored in the persistent file.
I found that RED.util.cloneMessage(msg.payload) makes a copy and I can modify that to send on in my flow.
I posted to the node-red forum about an issue I'm having with persistence.
Basically, after a dataOut retrieval, the msg.payload contains the JSON data. I then modify a parameter, such as msg.payload.password, to return the query to the user (but with the password blanked out). This payload is NOT stored.
The next dataIn retrieval for the same query returns the modified in-memory version, instead of going to the values stored in the persistent file.
I found that RED.util.cloneMessage(msg.payload) makes a copy and I can modify that to send on in my flow.
Without the clone message, the next retrieval has a JSON object with an empty password.
For me this wasn't obvious.
The text was updated successfully, but these errors were encountered: