# Data preparation from different object layers

**URL:** <https://discourse.nodered.org/t/data-preparation-from-different-object-layers/48884>\
**Category:** General\
**Created:** [25 July 2021 16:15 UTC](https://discourse.nodered.org/t/data-preparation-from-different-object-layers/48884 "2021-07-25T16:15:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![edstobi](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@edstobi](https://discourse.nodered.org/u/edstobi)\
**Post date:** [25 July 2021 16:15 UTC](https://discourse.nodered.org/t/data-preparation-from-different-object-layers/48884/1 "2021-07-25T16:15:01Z")

</div>

Hello  
I am reading an xml file via http reques. I send this to the xml parser and get a lot of data.  
See picture.

 ![nodered1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/b/2b4060c73825423550950300977e2e8465a44501.jpeg)

I always needed only one value and read it directly as object 3.  
Unfortunately, the xml file is changed some time and my value is sometimes in object 3 or 4 or at other positions.  
So I have to adjust my processing.  
I have found that it is always the same ROMId and therefore only one sensor. 😀 Health says something about the reliability of the measured data and is usually around 7.  
Under Themperatur, is still an object lower ,the higly requested value is located.

How can I best summarize the data and create an output with the 3 above values ( ROMId, Health and Temper value) for ALL DS18S20 even if the data supplier has once again one sensor more or less.  
Then I can search for the ROMId.

> {"Devices-Detail-Response":{"$":{"xmlns":"[http://www.embeddeddatasystems.com/schema/owserver","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},"PollCount":["2038611"],"DevicesConnected":["12"],"LoopTime":["10.749"],"DataErrors":["780"],"owd\_DS18S20":[{"$":{"Description":"Parasite](http://www.embeddeddatasystems.com/schema/owserver%22,%22xmlns:xsi%22:%22http://www.w3.org/2001/XMLSchema-instance%22%7D,%22PollCount%22:%5B%222038611%22%5D,%22DevicesConnected%22:%5B%2212%22%5D,%22LoopTime%22:%5B%2210.749%22%5D,%22DataErrors%22:%5B%22780%22%5D,%22owd_DS18S20%22:%5B%7B%22$%22:%7B%22Description%22:%22Parasite) power thermometer"},"Name":["DS18S20"],"Family":["10"],"ROMId":["BB00080172AD3010"],"Health":["7"],"RawData":["49004B46FFFF0210ED00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"],"PrimaryValue":["36.5 Deg C"],"Temperature":[{"_":"36.5","$":{"Units":"Centigrade"}}],"UserByte1":[{"_":"75","$":{"Writable":"True"}}],"UserByte2":[{"_":"70","$":{"Writable":"True"}}]},{"$":{"Description":"Parasite power thermometer"},"Name":["DS18S20"],"Family":["10"],"ROMId":["1200080172A1D810"],"Health":["7"],"RawData":["56004B46FFFF0A103500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"],"PrimaryValue":["43.0 Deg C"],"Temperature":[{"_":"43.0","$":{"Units":"Centigrade"}}],"UserByte1":[{"_":"75","$":{"Writable":"True"}}],"UserByte2":[{"_":"70","$":{"Writable":"True"}}]},{"$":{"Description":"Parasite power thermometer"},"Name":["DS18S20"],"Family":["10"],"ROMId":["67000801CA106410"],"Health":["7"],"RawData":["88004B46FFFF0D106D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"],"PrimaryValue":["68.0 Deg C"],"Temperature":[{"_":"68.0","$":{"Units":"Centigrade"}}],"UserByte1":[{"_":"75","$":{"Writable":"True"}}],"UserByte2":[{"_":"70","$":{"Writable":"True"}}]},{"$":{"Description":"Parasite power thermometer"},"Name":["DS18S20"],"Family":["10"],"ROMId":["5E00080172389410"],"Health":["7"],"RawData":["72004B46FFFF0F107700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"],"PrimaryValue":["57.0 Deg C"],"Temperature":[{"_":"57.0","$":{"Units":"Centigrade"}}],"UserByte1":[{"_":"75","$":{"Writable":"True"}}],"UserByte2":[{"_":"70","$":{"Writable":"True"}}]},{"$":{"Description":"Parasite power thermometer"},"Name":["DS18S20"],"Family":["10"],"ROMId":["23000801729B9410"],"Health":["7"],"RawData":["70004B46FFFF0C10A400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"],"PrimaryValue":["56.0 Deg C"],"Temperature":[{"_":"56.0","$":{"Units":"Centigrade"}}],"UserByte1":[{"_":"75","$":{"Writable":"True"}}],"UserByte2":[{"_":"70","$":{"Writable":"True"}}]},{"$":{"Description":"Parasite power thermometer"},"Name":["DS18S20"],"Family":["10"],"ROMId":["4F000801728D5A10"],"Health":["7"],"RawData":["84004B46FFFF09106900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"],"PrimaryValue":["66.0 Deg C"],"Temperature":[{"_":"66.0","$":{"Units":"Centigrade"}}],"UserByte1":[{"_":"75","$":{"Writable":"True"}}],"UserByte2":[{"_":"70","$":{"Writable":"True"}}]},{"$":{"Description":"Parasite power thermometer"},"Name":["DS18S20"],"Family":["10"],"ROMId":["0500080172BEFE10"],"Health":["7"],"RawData":["86004B46FFFF0C101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"],"PrimaryValue":["67.0 Deg C"],"Temperature":[{"_":"67.0","$":{"Units":"Centigrade"}}],"UserByte1":[{"_":"75","$":{"Writable":"True"}}],"UserByte2":[{"_":"70","$":{"Writable":"True"}}]},{"$":{"Description":"Parasite power thermometer"},"Name":["DS18S20"],"Family":["10"],"ROMId":["62000801CA204510"],"Health":["7"],"RawData":["89004B46FFFF06100D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"],"PrimaryValue":["68.5 Deg C"],"Temperature":[{"_":"68.5","$":{"Units":"Centigrade"}}],"UserByte1":[{"_":"75","$":{"Writable":"True"}}],"UserByte2":[{"_":"70","$":{"Writable":"True"}}]},{"$":{"Description":"Parasite power thermometer"},"Name":["DS18S20"],"Family":["10"],"ROMId":["7A00080172AB1510"],"Health":["7"],"RawData":["3E004B46FFFF0910AB00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"],"PrimaryValue":["31.0 Deg C"],"Temperature":[{"_":"31.0","$":{"Units":"Centigrade"}}],"UserByte1":[{"_":"75","$":{"Writable":"True"}}],"UserByte2":[{"_":"70","$":{"Writable":"True"}}]},{"$":{"Description":"Parasite power thermometer"},"Name":["DS18S20"],"Family":["10"],"ROMId":["0C000801CA3B2D10"],"Health":["7"],"RawData":["6D004B46FFFF01100500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"],"PrimaryValue":["54.5 Deg C"],"Temperature":[{"_":"54.5","$":{"Units":"Centigrade"}}],"UserByte1":[{"_":"75","$":{"Writable":"True"}}],"UserByte2":[{"_":"70","$":{"Writable":"True"}}]},{"$":{"Description":"Parasite power thermometer"},"Name":["DS18S20"],"Family":["10"],"ROMId":["17000801CA011710"],"Health":["7"],"RawData":["6C004B46FFFF09103000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"],"PrimaryValue":["54.0 Deg C"],"Temperature":[{"_":"54.0","$":{"Units":"Centigrade"}}],"UserByte1":[{"_":"75","$":{"Writable":"True"}}],"UserByte2":[{"_":"70","$":{"Writable":"True"}}]}],"owd\_DS2408":[{"$":{"Description":"8-Channel Addressable Switch"},"Name":["DS2408"],"Family":["29"],"ROMId":["FA0000000C56E529"],"Health":["7"],"RawData":["8FFFFF00008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"],"PrimaryValue":["143"],"PIOLogicState":["143"],"PIOOutputLatchState":[{"_":"255","$":{"Writable":"True"}}],"PIOActivityLatchState":[{"_":"255","$":{"Writable":"True"}}],"RSTZconfiguration":[{"_":"0","$":{"Writable":"True"}}],"PowerOnResetLatch":[{"\_":"0","$":{"Writable":"True"}}],"VccPowerStatus":["1"]}]}}

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [25 July 2021 16:53 UTC](https://discourse.nodered.org/t/data-preparation-from-different-object-layers/48884/2 "2021-07-25T16:53:34Z")

</div>

Here is an example using JSONata and a change node.

Your temp reading is in an array and does not have a object key. So to get the temps i had to work around the issue.

```auto
[{"id":"81cb466e.5f6f2","type":"inject","z":"c74669a0.6a34f8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"Devices-Detail-Response\":{\"$\":{\"xmlns\":\"http://www.embeddeddatasystems.com/schema/owserver\",\"xmlns:xsi\":\"http://www.w3.org/2001/XMLSchema-instance\"},\"PollCount\":[\"2038611\"],\"DevicesConnected\":[\"12\"],\"LoopTime\":[\"10.749\"],\"DataErrors\":[\"780\"],\"owd_DS18S20\":[{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"BB00080172AD3010\"],\"Health\":[\"7\"],\"RawData\":[\"49004B46FFFF0210ED00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"36.5 Deg C\"],\"Temperature\":[{\"\":\"36.5\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"1200080172A1D810\"],\"Health\":[\"7\"],\"RawData\":[\"56004B46FFFF0A103500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"43.0 Deg C\"],\"Temperature\":[{\"\":\"43.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"67000801CA106410\"],\"Health\":[\"7\"],\"RawData\":[\"88004B46FFFF0D106D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"68.0 Deg C\"],\"Temperature\":[{\"\":\"68.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"5E00080172389410\"],\"Health\":[\"7\"],\"RawData\":[\"72004B46FFFF0F107700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"57.0 Deg C\"],\"Temperature\":[{\"\":\"57.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"23000801729B9410\"],\"Health\":[\"7\"],\"RawData\":[\"70004B46FFFF0C10A400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"56.0 Deg C\"],\"Temperature\":[{\"\":\"56.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"4F000801728D5A10\"],\"Health\":[\"7\"],\"RawData\":[\"84004B46FFFF09106900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"66.0 Deg C\"],\"Temperature\":[{\"\":\"66.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"0500080172BEFE10\"],\"Health\":[\"7\"],\"RawData\":[\"86004B46FFFF0C101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"67.0 Deg C\"],\"Temperature\":[{\"\":\"67.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"62000801CA204510\"],\"Health\":[\"7\"],\"RawData\":[\"89004B46FFFF06100D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"68.5 Deg C\"],\"Temperature\":[{\"\":\"68.5\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"7A00080172AB1510\"],\"Health\":[\"7\"],\"RawData\":[\"3E004B46FFFF0910AB00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"31.0 Deg C\"],\"Temperature\":[{\"\":\"31.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"0C000801CA3B2D10\"],\"Health\":[\"7\"],\"RawData\":[\"6D004B46FFFF01100500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"54.5 Deg C\"],\"Temperature\":[{\"\":\"54.5\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"17000801CA011710\"],\"Health\":[\"7\"],\"RawData\":[\"6C004B46FFFF09103000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"54.0 Deg C\"],\"Temperature\":[{\"\":\"54.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]}],\"owd_DS2408\":[{\"$\":{\"Description\":\"8-Channel Addressable Switch\"},\"Name\":[\"DS2408\"],\"Family\":[\"29\"],\"ROMId\":[\"FA0000000C56E529\"],\"Health\":[\"7\"],\"RawData\":[\"8FFFFF00008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"143\"],\"PIOLogicState\":[\"143\"],\"PIOOutputLatchState\":[{\"\":\"255\",\"$\":{\"Writable\":\"True\"}}],\"PIOActivityLatchState\":[{\"\":\"255\",\"$\":{\"Writable\":\"True\"}}],\"RSTZconfiguration\":[{\"\":\"0\",\"$\":{\"Writable\":\"True\"}}],\"PowerOnResetLatch\":[{\"_\":\"0\",\"$\":{\"Writable\":\"True\"}}],\"VccPowerStatus\":[\"1\"]}]}}","payloadType":"json","x":230,"y":980,"wires":[["5ca87b41.8332bc"]]},{"id":"5ca87b41.8332bc","type":"change","z":"c74669a0.6a34f8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.`Devices-Detail-Response`.owd_DS18S20.{\"ROMId\": ROMId[0],\"Health\": Health[0], \"Temperature\": Temperature[0].*[0]}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":1060,"wires":[["68f1a316.5e352c","633b6cf4.123b84"]]},{"id":"68f1a316.5e352c","type":"debug","z":"c74669a0.6a34f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":720,"y":1060,"wires":[]},{"id":"633b6cf4.123b84","type":"change","z":"c74669a0.6a34f8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[ROMId=\"4F000801728D5A10\"].Temperature","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":1120,"wires":[["6b5fdace.c11e8c"]]},{"id":"6b5fdace.c11e8c","type":"debug","z":"c74669a0.6a34f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":790,"y":1120,"wires":[]}]

```

[edit] or if you want to have the ROMId as an object property. You can also convert the strings to integer or floats.

```auto
[{"id":"81cb466e.5f6f2","type":"inject","z":"c74669a0.6a34f8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"Devices-Detail-Response\":{\"$\":{\"xmlns\":\"http://www.embeddeddatasystems.com/schema/owserver\",\"xmlns:xsi\":\"http://www.w3.org/2001/XMLSchema-instance\"},\"PollCount\":[\"2038611\"],\"DevicesConnected\":[\"12\"],\"LoopTime\":[\"10.749\"],\"DataErrors\":[\"780\"],\"owd_DS18S20\":[{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"BB00080172AD3010\"],\"Health\":[\"7\"],\"RawData\":[\"49004B46FFFF0210ED00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"36.5 Deg C\"],\"Temperature\":[{\"\":\"36.5\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"1200080172A1D810\"],\"Health\":[\"7\"],\"RawData\":[\"56004B46FFFF0A103500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"43.0 Deg C\"],\"Temperature\":[{\"\":\"43.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"67000801CA106410\"],\"Health\":[\"7\"],\"RawData\":[\"88004B46FFFF0D106D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"68.0 Deg C\"],\"Temperature\":[{\"\":\"68.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"5E00080172389410\"],\"Health\":[\"7\"],\"RawData\":[\"72004B46FFFF0F107700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"57.0 Deg C\"],\"Temperature\":[{\"\":\"57.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"23000801729B9410\"],\"Health\":[\"7\"],\"RawData\":[\"70004B46FFFF0C10A400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"56.0 Deg C\"],\"Temperature\":[{\"\":\"56.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"4F000801728D5A10\"],\"Health\":[\"7\"],\"RawData\":[\"84004B46FFFF09106900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"66.0 Deg C\"],\"Temperature\":[{\"\":\"66.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"0500080172BEFE10\"],\"Health\":[\"7\"],\"RawData\":[\"86004B46FFFF0C101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"67.0 Deg C\"],\"Temperature\":[{\"\":\"67.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"62000801CA204510\"],\"Health\":[\"7\"],\"RawData\":[\"89004B46FFFF06100D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"68.5 Deg C\"],\"Temperature\":[{\"\":\"68.5\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"7A00080172AB1510\"],\"Health\":[\"7\"],\"RawData\":[\"3E004B46FFFF0910AB00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"31.0 Deg C\"],\"Temperature\":[{\"\":\"31.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"0C000801CA3B2D10\"],\"Health\":[\"7\"],\"RawData\":[\"6D004B46FFFF01100500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"54.5 Deg C\"],\"Temperature\":[{\"\":\"54.5\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]},{\"$\":{\"Description\":\"Parasite power thermometer\"},\"Name\":[\"DS18S20\"],\"Family\":[\"10\"],\"ROMId\":[\"17000801CA011710\"],\"Health\":[\"7\"],\"RawData\":[\"6C004B46FFFF09103000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"54.0 Deg C\"],\"Temperature\":[{\"\":\"54.0\",\"$\":{\"Units\":\"Centigrade\"}}],\"UserByte1\":[{\"\":\"75\",\"$\":{\"Writable\":\"True\"}}],\"UserByte2\":[{\"\":\"70\",\"$\":{\"Writable\":\"True\"}}]}],\"owd_DS2408\":[{\"$\":{\"Description\":\"8-Channel Addressable Switch\"},\"Name\":[\"DS2408\"],\"Family\":[\"29\"],\"ROMId\":[\"FA0000000C56E529\"],\"Health\":[\"7\"],\"RawData\":[\"8FFFFF00008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"],\"PrimaryValue\":[\"143\"],\"PIOLogicState\":[\"143\"],\"PIOOutputLatchState\":[{\"\":\"255\",\"$\":{\"Writable\":\"True\"}}],\"PIOActivityLatchState\":[{\"\":\"255\",\"$\":{\"Writable\":\"True\"}}],\"RSTZconfiguration\":[{\"\":\"0\",\"$\":{\"Writable\":\"True\"}}],\"PowerOnResetLatch\":[{\"_\":\"0\",\"$\":{\"Writable\":\"True\"}}],\"VccPowerStatus\":[\"1\"]}]}}","payloadType":"json","x":230,"y":980,"wires":[["5ca87b41.8332bc"]]},{"id":"5ca87b41.8332bc","type":"change","z":"c74669a0.6a34f8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.`Devices-Detail-Response`.owd_DS18S20.${\tROMId[0]:{\t\"Health\": $number(Health[0]), \t\"Temperature\": $number(Temperature[0].*[0]), \t\"Unit\": Temperature[0].*[1].Units}}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":1060,"wires":[["68f1a316.5e352c","633b6cf4.123b84"]]},{"id":"68f1a316.5e352c","type":"debug","z":"c74669a0.6a34f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":720,"y":1060,"wires":[]},{"id":"633b6cf4.123b84","type":"change","z":"c74669a0.6a34f8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.`4F000801728D5A10`.Temperature","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":1120,"wires":[["6b5fdace.c11e8c"]]},{"id":"6b5fdace.c11e8c","type":"debug","z":"c74669a0.6a34f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":790,"y":1120,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![edstobi](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@edstobi](https://discourse.nodered.org/u/edstobi)\
**Post date:** [25 July 2021 19:15 UTC](https://discourse.nodered.org/t/data-preparation-from-different-object-layers/48884/3 "2021-07-25T19:15:16Z")

</div>

WAU!  
a very big thank you E1cid  
My attempts are felt 1000 times as large.  
In particular, the second approach is perfect for me to convert. And that without adapting my existing environment much.  
I will need some more time to understand the subtleties of JSON.  
For this my programming knowledge is still in beginner mode.  
THX  
Edstobi

---

<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:** [8 August 2021 19:15 UTC](https://discourse.nodered.org/t/data-preparation-from-different-object-layers/48884/4 "2021-08-08T19:15:39Z")

</div>

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