Hi friends,
I connect to the node-red server with mqtt and send a json object as follows.
{"nodebolge": "tttttt", "nodename": "device5", "nodeabone": "144", "index": "655477"}
If you have the same record with the "nodename" field, how can I update that record.
[{"id":"82480c90.eb63c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"198a0d21.d320f3","type":"mqtt in","z":"82480c90.eb63c","name":"","topic":"/deneme/#","qos":"0","broker":"20b98e5f.a35d02","x":80,"y":100,"wires":[["e7872a27.108a38"]]},{"id":"ed7155f2.0b3398","type":"influxdb out","z":"82480c90.eb63c","influxdb":"bff5e425.ff6f68","name":"","measurement":"nodes","precision":"","retentionPolicy":"","x":680,"y":80,"wires":},{"id":"e7872a27.108a38","type":"json","z":"82480c90.eb63c","name":"","property":"payload","action":"","pretty":false,"x":210,"y":100,"wires":[["3f92a06b.8a235","f9f53243.c7b2e","4e20cb46.5ae044"]]},{"id":"3f92a06b.8a235","type":"debug","z":"82480c90.eb63c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":390,"y":120,"wires":},{"id":"f9f53243.c7b2e","type":"function","z":"82480c90.eb63c","name":"MQTT to InfluxDB","func":"\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":80,"wires":[["9b5c50ba.dbe6e","ed7155f2.0b3398","b9655963.9c5818"]]},{"id":"9b5c50ba.dbe6e","type":"debug","z":"82480c90.eb63c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":610,"y":40,"wires":},{"id":"b9655963.9c5818","type":"ui_text","z":"82480c90.eb63c","group":"85fb1c35.e8786","order":0,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":590,"y":120,"wires":},{"id":"8e484b23.a5dce8","type":"mongodb2 in","z":"82480c90.eb63c","service":"ext","configNode":"2666b88d.91e6f8","name":"","collection":"cihazlar","operation":"insert","x":310,"y":360,"wires":[["42221050.c7375"]]},{"id":"4e20cb46.5ae044","type":"function","z":"82480c90.eb63c","name":"MQTT to InfluxDB","func":"msg.payload = msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":210,"y":300,"wires":[["8e484b23.a5dce8"]]},{"id":"42221050.c7375","type":"debug","z":"82480c90.eb63c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":410,"y":420,"wires":},{"id":"20b98e5f.a35d02","type":"mqtt-broker","z":"82480c90.eb63c","name":"centos","broker":"192.168.1.104","port":"1883","clientid":"node-red","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"bff5e425.ff6f68","type":"influxdb","z":"","hostname":"192.168.1.104","port":"8086","protocol":"http","database":"enriot","name":"","usetls":false,"tls":""},{"id":"85fb1c35.e8786","type":"ui_group","z":"","name":"Default","tab":"c07006d.07c3af8","disp":true,"width":"6","collapse":false},{"id":"2666b88d.91e6f8","type":"mongodb2","z":"","uri":"mongodb://localhost:27017/ENRIOT","name":"","options":"","parallelism":"-1"},{"id":"c07006d.07c3af8","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]