# Save data from the object to influxdb

**URL:** <https://discourse.nodered.org/t/save-data-from-the-object-to-influxdb/49000>\
**Category:** General\
**Created:** [28 July 2021 07:51 UTC](https://discourse.nodered.org/t/save-data-from-the-object-to-influxdb/49000 "2021-07-28T07:51:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [28 July 2021 07:51 UTC](https://discourse.nodered.org/t/save-data-from-the-object-to-influxdb/49000/1 "2021-07-28T07:51:17Z")

</div>

Hello

```auto
[{"id":"5297e597a1c4de59","type":"inject","z":"d753f1f6adf829e0","name":"push","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":170,"y":340,"wires":[["7c686f9367a2f9bb"]]},{"id":"7c686f9367a2f9bb","type":"http request","z":"d753f1f6adf829e0","name":"station=WYN","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://app-prod-ws.meteoswiss-app.ch/v1/stationOverview?station=WYN","tls":"","persist":false,"proxy":"","authType":"","x":330,"y":340,"wires":[["e51415720f17df0c","ff095262c104ede5","49b086343c02afa3"]]},{"id":"e51415720f17df0c","type":"change","z":"d753f1f6adf829e0","name":"","rules":[{"t":"move","p":"payload.WYN.temperature","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":340,"wires":[["abe3edcf637cb81c"]]},{"id":"ff095262c104ede5","type":"debug","z":"d753f1f6adf829e0","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":610,"y":280,"wires":[]},{"id":"49b086343c02afa3","type":"influxdb out","z":"d753f1f6adf829e0","influxdb":"d49ae852893ea877","name":"test WYN","measurement":"WYN","precision":"","retentionPolicy":"","database":"database","precisionV18FluxV20":"ms","retentionPolicyV18Flux":"","org":"organisation","bucket":"bucket","x":600,"y":220,"wires":[]},{"id":"abe3edcf637cb81c","type":"influxdb out","z":"d753f1f6adf829e0","influxdb":"d49ae852893ea877","name":"test WYN temp","measurement":"WYN_temp","precision":"","retentionPolicy":"","database":"database","precisionV18FluxV20":"ms","retentionPolicyV18Flux":"","org":"organisation","bucket":"bucket","x":1020,"y":340,"wires":[]},{"id":"d49ae852893ea877","type":"influxdb","hostname":"10.147.42.155","port":"8086","protocol":"http","database":"test","name":"test","usetls":false,"tls":"","influxdbVersion":"1.x","url":"http://localhost:8086","rejectUnauthorized":true}]

```

When cleaning up to move it to Node Red 2 i also wish to improve it too.

I have this request i use.

it works if i have the node 'Change' and it store the temp like this.  
the idea is to save all data without to have a node change for all wanted datas.

i got a error like

Error: A 400 Bad Request error occurred: {"error":"unable to parse 'WYN WYN=[object Object]': invalid boolean"}

is there a trick to do so? it just should start saving from the second object.

have a nice day  
vinc

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [28 July 2021 08:12 UTC](https://discourse.nodered.org/t/save-data-from-the-object-to-influxdb/49000/2 "2021-07-28T08:12:47Z")

</div>

Hi, in general people aren't going to want to load an unknown flow to answer a question since it takes time to do and undo and you are never quite sure what nodes/tabs are included.

The error is pretty clear, you are passing an object to something that wants a boolean true/false.

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [28 July 2021 08:31 UTC](https://discourse.nodered.org/t/save-data-from-the-object-to-influxdb/49000/3 "2021-07-28T08:31:26Z")

</div>

ok some people ask for the flow to understand

this is the output  
msg.payload : Object  
object  
WYN: object  
stationId: "WYN"  
time: 1627460743117  
temperature: 16.4  
windSpeed: 5.4  
windDirection: 230

i don't know how to by pass the first object and then only keep the second one with data!

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [28 July 2021 08:40 UTC](https://discourse.nodered.org/t/save-data-from-the-object-to-influxdb/49000/4 "2021-07-28T08:40:22Z")

</div>

found it

from the change node  
payload.WYN.temperatur just cut it down to  
payload.WYN  
and works fine and smart  
and more easy as expected!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 August 2021 08:40 UTC](https://discourse.nodered.org/t/save-data-from-the-object-to-influxdb/49000/5 "2021-08-11T08:40:23Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
