Hi friends,
The node-red stream is as follows.
How do I update with the code specified in "Set message payload function". I can insert insert with the same code, but I can't update the current record.
How do I update the function code?
Set message payload function
msg.payload ={"_id": msg["_id"]};
var msg = {
'collection' : 'cihazlar',
'operation': 'updateOne',
'payload': {
// '_id': '5c41cacec3bcb01b705c45b9',
'nodebolge': 'area',
'nodename': 'nameField',
'nodeabone': 'device3',
'endeks': 'index'
}
};
return msg;
Flow
Mongodb2
Switch
Set message payload function