# Retrieve Multiple Values from objects

**URL:** <https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161>\
**Category:** General\
**Created:** [4 October 2024 08:38 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161 "2024-10-04T08:38:29Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ortez](https://avatars.discourse-cdn.com/v4/letter/o/bbce88/32.png) [@Ortez](https://discourse.nodered.org/u/Ortez)\
**Post date:** [4 October 2024 08:38 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/1 "2024-10-04T08:38:29Z")

</div>

Hey Guys ,  
I am new in node-red, recently , i face an issue of get multiple data from object ,  
wonder if someone could give me a hint of how to do this.  
I am going to get information via mtconnect , however, after xml node , i do not know how to retrive more than one data , could someone help me ?

web-site i used: ([http://mtconnect.mazakcorp.com:5610/current](http://mtconnect.mazakcorp.com:5610/current))

 ![xml node](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/791ad8b889638cd04dd7ff64f134e3680defd90d.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 October 2024 08:50 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/2 "2024-10-04T08:50:26Z")

</div>

Show us what the debug node shows and tell us what you are trying to get from it.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [4 October 2024 09:02 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/3 "2024-10-04T09:02:12Z")

</div>

If you attach a debug node to the XML node, it should show something like this.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/8/b83cd2406f206464ea0cb98dae88d6c96f62d63c.png)  
The little grey arrow that I have pointed to lets you dig down into the debug output.

Keep on digging and you will eventually come to some real data

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/b/9b7156c4273ab52fc83f8c2634f6bd7e096246e0.png)

Hover over a data item and a "Copy path" button is offered. Clicking this will give the path by which you can access the data. eg  
`payload.MTConnectStreams.Streams[0].DeviceStream[0].ComponentStream[0].Condition[0].Normal[0].$.timestamp`  
So if in a function you set

```auto
msg.payload = msg.payload.MTConnectStreams.Streams[0].DeviceStream[0].ComponentStream[0].Condition[0].Normal[0].$.timestamp

```

it would acquire that value from the xml.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [4 October 2024 09:16 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/4 "2024-10-04T09:16:12Z")

</div>

> [@Ortez](#):
>
> I am new in node-red,

There are a lot of really good pointers in the official videos (like the Copy Path trick @jbudd shows above) so I recommend watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [4 October 2024 11:45 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/5 "2024-10-04T11:45:46Z")

</div>

There is also the [fastxml node](https://flows.nodered.org/node/node-red-contrib-fastxml) (which I wrote 🙂 ) which gives a slightly flatter tree by default - that I find easier to manipulate. eg the example above becomes

```auto
payload.MTConnectStreams.Streams.DeviceStream.ComponentStream[0].Condition.Normal[0].timestamp

```

---

<div class="post-metadata">

**Author:** ![Ortez](https://avatars.discourse-cdn.com/v4/letter/o/bbce88/32.png) [@Ortez](https://discourse.nodered.org/u/Ortez)\
**Post date:** [4 October 2024 22:50 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/6 "2024-10-04T22:50:20Z")

</div>

Thank you , how about if i would like to retrive more than one value?  
Take above as example: if i want to get timestamp and name and type?

I am able to retrive one value, when multiple values , i totally have no idea.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [4 October 2024 23:09 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/7 "2024-10-04T23:09:16Z")

</div>

What do you want to do with these values once you have retrieved them?

---

<div class="post-metadata">

**Author:** ![Ortez](https://avatars.discourse-cdn.com/v4/letter/o/bbce88/32.png) [@Ortez](https://discourse.nodered.org/u/Ortez)\
**Post date:** [6 October 2024 05:24 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/8 "2024-10-06T05:24:23Z")

</div>

in fact , i have another mtconnect device , i wouldl like to know multiple information from data , that is why i need to retrive several information . however, i only can get one info from above hint.  
That is why i try to learn ....

thank you

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [6 October 2024 05:44 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/9 "2024-10-06T05:44:10Z")

</div>

> [@Ortez](#):
>
> , i only can get one info from above hint

You can follow the hint (copy path) for any property of the data and use that to address any part of the data you desire.

> [@Ortez](#):
>
> i need to retrive several information

It's all there. In the payload. Perhaps if you state what you are doing with these we can better help.

---

<div class="post-metadata">

**Author:** ![Ortez](https://avatars.discourse-cdn.com/v4/letter/o/bbce88/32.png) [@Ortez](https://discourse.nodered.org/u/Ortez)\
**Post date:** [6 October 2024 05:54 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/10 "2024-10-06T05:54:54Z")

</div>

is there any possibility i retrive timestamp , name , type in one message ?  
1.payload.MTConnectStreams.Streams[0].DeviceStream[0].ComponentStream[0].Condition[0].Normal[0].$.timestamp  
2.payload.MTConnectStreams.Streams[0].DeviceStream[0].ComponentStream[0].Condition[0].Normal[0].$.name  
payload.MTConnectStreams.Streams[0].DeviceStream[0].ComponentStream[0].Condition[0].Normal[0].$.type

in message node , i can only output one value , should I add a function node ?

Thank you so much

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [6 October 2024 06:13 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/11 "2024-10-06T06:13:24Z")

</div>

> [@Ortez](#):
>
> is there any possibility i retrive timestamp , name , type in one message

Yes.

Use a change node and set multiple parts in one go.

 ![Screenshot 2024-10-06 07.13.52](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/9/490d0ef22a62296dc648c78f398d7871368d53aa.png)

**EDIT 1: the value fields above should be set for `msg.` not `a``z` like i did in this mock up. _thanks for the catch @E1cid_**

**EDIT 2: This wont work withoug first copying payload to a temp property 🤦‍♂️ see @E1cid example below**

If you want multiple properties from other elements, then you can use a split node in combination with the change node and the "copy path" technique.

Again though, you dont state what you want the data for. How you rearrange it may be influenced by what your end goal is.

PS, this is quite base level knowledge - perhaps a bit time learning would help: I recommend watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [6 October 2024 07:52 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/12 "2024-10-06T07:52:32Z")

</div>

> [@Ortez](#):
>
> in message node , i can only output one value , should I add a function node ?

I do not understand what you mean by "message node can only output one value". What message node?

@Steve-Mcl has shown you how you can greatly simplify the data so that msg.payload contains just the three data properties of interest, but it is still a Javascript object.

If I send that payload in an email, I get this, which is at least understandable

```auto
{"timestamp":1728200899356,"name":"servo_cond","type":"ACTUATOR"}

```

There would be no problem sending that payload as an MQTT message either.

But if I send it unmodified in an SMS message I get something less useful

```auto
[object Object]

```

That's why I asked what you want to do with the data.

---

<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:** [6 October 2024 08:50 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/14 "2024-10-06T08:50:07Z")

</div>

Here is a full example of how to move the values you require from msg.payload

```auto
[{"id":"ad8ac01912a2df89","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"<MTConnectStreams xmlns:m=\"urn:mtconnect.org:MTConnectStreams:1.3\" xmlns=\"urn:mtconnect.org:MTConnectStreams:1.3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:x=\"urn:mazakusa.com:MazakStreams:1.3\" xsi:schemaLocation=\"urn:mazakusa.com:MazakStreams:1.3 /schemas/MazakStreams_1.3.xsd\"> <Header creationTime=\"2024-10-06T08:39:50Z\" sender=\"DMZ-MTCNCT\" instanceId=\"1727953953\" version=\"1.4.0.12\" bufferSize=\"8192\" nextSequence=\"372964\" firstSequence=\"364772\" lastSequence=\"372963\"/> <Streams> <DeviceStream name=\"MFMS10-MC2\" uuid=\"9617890b-7526-9f6b-214f-0c860ace6485\"> <ComponentStream component=\"Axes\" name=\"base\" componentId=\"a\"> <Condition> <Normal dataItemId=\"servo\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"servo_cond\" sequence=\"87\" type=\"ACTUATOR\"/> <Normal dataItemId=\"spndl\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"spindle_cond\" sequence=\"96\" type=\"SYSTEM\"/> </Condition> </ComponentStream> <ComponentStream component=\"Rotary\" name=\"C\" componentId=\"c\"> <Samples> <AngularVelocity dataItemId=\"cf\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"Cfrt\" sequence=\"7\">UNAVAILABLE</AngularVelocity> <Load dataItemId=\"cl\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Cload\" sequence=\"139\">UNAVAILABLE</Load> <Angle dataItemId=\"cposm\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Cabs\" sequence=\"135\" subType=\"ACTUAL\">UNAVAILABLE</Angle> <Angle dataItemId=\"cposw\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Cpos\" sequence=\"134\" subType=\"ACTUAL\">UNAVAILABLE</Angle> <RotaryVelocity dataItemId=\"cs\" timestamp=\"2024-10-04T18:20:00.075841Z\" name=\"Srpm\" sequence=\"337490\" subType=\"ACTUAL\">0</RotaryVelocity> <Temperature dataItemId=\"ctemp\" timestamp=\"2024-10-05T00:26:50.841081Z\" name=\"Stemp\" sequence=\"343427\">24</Temperature> <Load dataItemId=\"sl\" timestamp=\"2024-10-04T18:19:58.997721Z\" name=\"Sload\" sequence=\"337480\">0</Load> </Samples> <Events> <AxisState dataItemId=\"caxisstate\" timestamp=\"2024-10-03T11:12:33.747702Z\" sequence=\"145\">UNAVAILABLE</AxisState> <RotaryMode dataItemId=\"rf\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"crfunc\" sequence=\"122\">SPINDLE</RotaryMode> </Events> <Condition> <Normal dataItemId=\"ct\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Ctravel\" sequence=\"102\" type=\"ANGLE\"/> <Normal dataItemId=\"spc\" timestamp=\"2024-10-04T18:19:58.997721Z\" name=\"Sload_cond\" sequence=\"337481\" type=\"LOAD\">Spindle1_load</Normal> <Unavailable dataItemId=\"tmp\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"Stemp_cond\" sequence=\"65\" type=\"TEMPERATURE\"/> </Condition> </ComponentStream> <ComponentStream component=\"Rotary\" name=\"C2\" componentId=\"c2\"> <Samples> <AngularVelocity dataItemId=\"cf2\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"C2frt\" sequence=\"8\">UNAVAILABLE</AngularVelocity> <Load dataItemId=\"cl2\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"C2load\" sequence=\"10\">UNAVAILABLE</Load> <Angle dataItemId=\"cpos2m\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"C2abs\" sequence=\"14\" subType=\"ACTUAL\">UNAVAILABLE</Angle> <Angle dataItemId=\"cpos2w\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"C2pos\" sequence=\"15\" subType=\"ACTUAL\">UNAVAILABLE</Angle> <RotaryVelocity dataItemId=\"cs2\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"S2rpm\" sequence=\"19\" subType=\"ACTUAL\">UNAVAILABLE</RotaryVelocity> <Temperature dataItemId=\"ctemp2\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"S2temp\" sequence=\"141\">UNAVAILABLE</Temperature> <Load dataItemId=\"sl2\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"S2load\" sequence=\"54\">UNAVAILABLE</Load> </Samples> <Events> <AxisState dataItemId=\"c2axisstate\" timestamp=\"2024-10-03T11:12:33.638331Z\" sequence=\"4\">UNAVAILABLE</AxisState> <RotaryMode dataItemId=\"rf2\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"c2rfunc\" sequence=\"123\">UNAVAILABLE</RotaryMode> </Events> <Condition> <Unavailable dataItemId=\"ct2\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"C2travel\" sequence=\"21\" type=\"ANGLE\"/> <Unavailable dataItemId=\"spc2\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"S2load_cond\" sequence=\"56\" type=\"LOAD\"/> <Unavailable dataItemId=\"tmp2\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"S2temp_cond\" sequence=\"66\" type=\"TEMPERATURE\"/> </Condition> </ComponentStream> <ComponentStream component=\"Controller\" name=\"controller\" componentId=\"cont\"> <Samples> <AccumulatedTime dataItemId=\"atime\" timestamp=\"2024-10-04T18:19:54.028981Z\" name=\"auto_time\" sequence=\"337463\" subType=\"x:AUTO\">47056527</AccumulatedTime> <AccumulatedTime dataItemId=\"ctime\" timestamp=\"2024-10-04T18:19:47.278970Z\" name=\"cut_time\" sequence=\"337456\" subType=\"x:CUT\">20268561</AccumulatedTime> <AccumulatedTime dataItemId=\"tcltime\" timestamp=\"2024-10-04T18:20:01.857096Z\" name=\"total_auto_cut_time\" sequence=\"337496\" subType=\"x:TOTALCUTTIME\">32158786</AccumulatedTime> <AccumulatedTime dataItemId=\"yltime\" timestamp=\"2024-10-06T08:38:43.725321Z\" name=\"total_time\" sequence=\"372940\" subType=\"x:TOTAL\">148110527</AccumulatedTime> </Samples> <Events> <EmergencyStop dataItemId=\"estop\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"estop\" sequence=\"107\">ARMED</EmergencyStop> <PalletId dataItemId=\"pltnum\" timestamp=\"2024-10-04T18:08:18.648913Z\" name=\"pallet_num\" sequence=\"334333\">2</PalletId> </Events> <Condition> <Normal dataItemId=\"ccond\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"comms_cond\" sequence=\"88\" type=\"COMMUNICATIONS\"/> <Normal dataItemId=\"logic\" timestamp=\"2024-10-04T10:21:53.306862Z\" name=\"logic_cond\" sequence=\"217463\" type=\"LOGIC_PROGRAM\"/> <Normal dataItemId=\"system\" timestamp=\"2024-10-04T20:16:02.185027Z\" name=\"system_cond\" sequence=\"339537\" type=\"SYSTEM\"/> </Condition> </ComponentStream> <ComponentStream component=\"Coolant\" name=\"coolant\" componentId=\"coolant\"> <Samples> <Concentration dataItemId=\"concentration\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"CONCENTRATION\" sequence=\"11\">UNAVAILABLE</Concentration> <Temperature dataItemId=\"cooltemp\" timestamp=\"2024-10-03T11:12:33.638331Z\" name=\"cooltemp\" sequence=\"13\">UNAVAILABLE</Temperature> </Samples> <Condition> <Normal dataItemId=\"coolhealth\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"coolant_cond\" sequence=\"94\" type=\"SYSTEM\"/> </Condition> </ComponentStream> <ComponentStream component=\"Device\" name=\"MFMS10-MC2\" componentId=\"d1\"> <Events> <Availability dataItemId=\"avail\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"avail\" sequence=\"103\">AVAILABLE</Availability> <AssetChanged dataItemId=\"d1_asset_chg\" timestamp=\"2024-10-04T18:20:34.514459Z\" sequence=\"337526\" assetType=\"CuttingTool\">M8010W4194N1.120</AssetChanged> <AssetRemoved dataItemId=\"d1_asset_rem\" timestamp=\"2024-10-04T12:09:03.845740Z\" sequence=\"239316\" assetType=\"CuttingTool\">M8010W4194N1.81</AssetRemoved> <FunctionalMode dataItemId=\"functionalmode\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"functionalmode\" sequence=\"104\">UNAVAILABLE</FunctionalMode> </Events> </ComponentStream> <ComponentStream component=\"Door\" name=\"door\" componentId=\"door1\"> <Events> <DoorState dataItemId=\"door\" timestamp=\"2024-10-04T10:21:43.713115Z\" name=\"doorstate\" sequence=\"217453\">CLOSED</DoorState> </Events> </ComponentStream> <ComponentStream component=\"Electric\" name=\"electric\" componentId=\"elec\"> <Condition> <Normal dataItemId=\"electric\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"electric_cond\" sequence=\"93\" type=\"SYSTEM\"/> </Condition> </ComponentStream> <ComponentStream component=\"Hydraulic\" name=\"hydraulic\" componentId=\"hydraulic\"> <Condition> <Normal dataItemId=\"hydhealth\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"hydra_cond\" sequence=\"92\" type=\"SYSTEM\"/> </Condition> </ComponentStream> <ComponentStream component=\"Lubrication\" name=\"lubrication\" componentId=\"lubrication\"> <Condition> <Normal dataItemId=\"lube\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"lubrication_cond\" sequence=\"95\" type=\"SYSTEM\"/> </Condition> </ComponentStream> <ComponentStream component=\"Path\" name=\"path\" componentId=\"path1\"> <Samples> <PathFeedrate dataItemId=\"pf\" timestamp=\"2024-10-04T18:20:05.764471Z\" name=\"Fact\" sequence=\"337516\" subType=\"ACTUAL\">0</PathFeedrate> </Samples> <Events> <RotaryVelocityOverride dataItemId=\"Sovr\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Sovr\" sequence=\"126\">100</RotaryVelocityOverride> <Execution dataItemId=\"exec\" timestamp=\"2024-10-04T18:20:05.061339Z\" name=\"execution\" sequence=\"337514\">READY</Execution> <ChuckState dataItemId=\"hd1chuckstate\" timestamp=\"2024-10-03T11:12:33.747702Z\" sequence=\"146\">UNAVAILABLE</ChuckState> <LineLabel dataItemId=\"linelabel\" timestamp=\"2024-10-04T18:20:06.155098Z\" sequence=\"337517\">0</LineLabel> <LineNumber dataItemId=\"linenumber\" timestamp=\"2024-10-04T18:20:06.155098Z\" sequence=\"337518\" subType=\"INCREMENTAL\">0</LineNumber> <ControllerMode dataItemId=\"mode\" timestamp=\"2024-10-04T10:21:48.322492Z\" name=\"mode\" sequence=\"217457\">AUTOMATIC</ControllerMode> <PartCount dataItemId=\"pc\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"PartCountAct\" sequence=\"109\">125</PartCount> <ProgramComment dataItemId=\"pcmt\" timestamp=\"2024-10-03T16:36:13.888562Z\" name=\"program_cmt\" sequence=\"65619\"/> <PathFeedrateOverride dataItemId=\"pfo\" timestamp=\"2024-10-04T10:22:01.853741Z\" name=\"Fovr\" sequence=\"217481\" subType=\"PROGRAMMED\">100</PathFeedrateOverride> <PathFeedrateOverride dataItemId=\"pfr\" timestamp=\"2024-10-04T17:34:12.853371Z\" name=\"Frapidovr\" sequence=\"326003\" subType=\"RAPID\">50</PathFeedrateOverride> <Program dataItemId=\"pgm\" timestamp=\"2024-10-04T18:08:29.742658Z\" name=\"program\" sequence=\"334342\">TH-6972-OP1</Program> <x:SequenceNumber dataItemId=\"seq\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"sequenceNum\" sequence=\"116\">UNAVAILABLE</x:SequenceNumber> <ProgramComment dataItemId=\"spcmt\" timestamp=\"2024-10-04T17:34:26.697118Z\" name=\"subprogram_cmt\" sequence=\"326026\" subType=\"x:SUB\"/> <Program dataItemId=\"spgm\" timestamp=\"2024-10-04T18:09:34.586419Z\" name=\"subprogram\" sequence=\"334672\" subType=\"x:SUB\"/> <ToolNumber dataItemId=\"tid\" timestamp=\"2024-10-04T18:19:38.357088Z\" name=\"Tool_number\" sequence=\"337414\">11</ToolNumber> <x:ToolGroup dataItemId=\"tid2\" timestamp=\"2024-10-04T18:19:38.357088Z\" name=\"Tool_group\" sequence=\"337415\">2004212</x:ToolGroup> <x:ToolSuffix dataItemId=\"tid3\" timestamp=\"2024-10-04T18:19:38.357088Z\" name=\"Tool_suffix\" sequence=\"337416\">L</x:ToolSuffix> <x:Unit dataItemId=\"unit\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"unitNum\" sequence=\"115\">UNAVAILABLE</x:Unit> </Events> <Condition> <Normal dataItemId=\"motion\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"motion_cond\" sequence=\"97\" type=\"MOTION_PROGRAM\"/> <Normal dataItemId=\"path_system\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"path_system\" sequence=\"98\" type=\"SYSTEM\"/> </Condition> </ComponentStream> <ComponentStream component=\"Pneumatic\" name=\"pneumatic\" componentId=\"pneumatic\"> <Condition> <Normal dataItemId=\"pneucond\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"pneu_cond\" sequence=\"91\" type=\"SYSTEM\"/> </Condition> </ComponentStream> <ComponentStream component=\"Linear\" name=\"X\" componentId=\"x\"> <Samples> <AxisFeedrate dataItemId=\"xf\" timestamp=\"2024-10-04T18:20:03.983221Z\" name=\"Xfrt\" sequence=\"337510\">0</AxisFeedrate> <Load dataItemId=\"xl\" timestamp=\"2024-10-06T08:39:26.725328Z\" name=\"Xload\" sequence=\"372963\">4</Load> <Position dataItemId=\"xpm\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Xabs\" sequence=\"131\" subType=\"ACTUAL\">UNAVAILABLE</Position> <Position dataItemId=\"xpw\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Xpos\" sequence=\"128\" subType=\"ACTUAL\">UNAVAILABLE</Position> </Samples> <Events> <AxisState dataItemId=\"xaxisstate\" timestamp=\"2024-10-04T18:20:03.983221Z\" sequence=\"337511\">STOPPED</AxisState> </Events> <Condition> <Normal dataItemId=\"xt\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Xtravel\" sequence=\"99\" type=\"POSITION\"/> </Condition> </ComponentStream> <ComponentStream component=\"Linear\" name=\"Y\" componentId=\"y\"> <Samples> <AxisFeedrate dataItemId=\"yf\" timestamp=\"2024-10-04T18:20:01.857096Z\" name=\"Yfrt\" sequence=\"337502\">0</AxisFeedrate> <Load dataItemId=\"yl\" timestamp=\"2024-10-06T08:39:08.928447Z\" name=\"Yload\" sequence=\"372955\">33</Load> <Position dataItemId=\"ypm\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Yabs\" sequence=\"132\" subType=\"ACTUAL\">UNAVAILABLE</Position> <Position dataItemId=\"ypw\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Ypos\" sequence=\"129\" subType=\"ACTUAL\">UNAVAILABLE</Position> </Samples> <Events> <AxisState dataItemId=\"yaxisstate\" timestamp=\"2024-10-04T18:20:01.857096Z\" sequence=\"337503\">STOPPED</AxisState> </Events> <Condition> <Normal dataItemId=\"yt\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Ytravel\" sequence=\"100\" type=\"POSITION\"/> </Condition> </ComponentStream> <ComponentStream component=\"Linear\" name=\"Z\" componentId=\"z\"> <Samples> <AxisFeedrate dataItemId=\"zf\" timestamp=\"2024-10-04T18:20:00.075841Z\" name=\"Zfrt\" sequence=\"337488\">0</AxisFeedrate> <Load dataItemId=\"zl\" timestamp=\"2024-10-06T08:39:08.225333Z\" name=\"Zload\" sequence=\"372954\">2</Load> <Position dataItemId=\"zpm\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Zabs\" sequence=\"133\" subType=\"ACTUAL\">UNAVAILABLE</Position> <Position dataItemId=\"zpw\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Zpos\" sequence=\"130\" subType=\"ACTUAL\">UNAVAILABLE</Position> </Samples> <Events> <AxisState dataItemId=\"zaxisstate\" timestamp=\"2024-10-04T18:20:00.075841Z\" sequence=\"337489\">STOPPED</AxisState> </Events> <Condition> <Normal dataItemId=\"zt\" timestamp=\"2024-10-03T11:12:33.747702Z\" name=\"Ztravel\" sequence=\"101\" type=\"POSITION\"/> </Condition> </ComponentStream> </DeviceStream> </Streams> </MTConnectStreams>","payloadType":"str","x":250,"y":7460,"wires":[["76684d0683a5214a"]]},{"id":"76684d0683a5214a","type":"xml","z":"d1395164b4eec73e","name":"","property":"payload","attr":"","chr":"","x":390,"y":7460,"wires":[["12d5a84f804407f1"]]},{"id":"12d5a84f804407f1","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"temp.timestamp","pt":"msg","to":"payload.MTConnectStreams.Streams[0].DeviceStream[0].ComponentStream[0].Condition[0].Normal[0].$.timestamp","tot":"msg"},{"t":"set","p":"temp.name","pt":"msg","to":"payload.MTConnectStreams.Streams[0].DeviceStream[0].ComponentStream[0].Condition[0].Normal[0].$.name","tot":"msg"},{"t":"set","p":"temp.type","pt":"msg","to":"payload.MTConnectStreams.Streams[0].DeviceStream[0].ComponentStream[0].Condition[0].Normal[0].$.type","tot":"msg"},{"t":"move","p":"temp","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":7460,"wires":[["ceb9f7b78951b4a6"]]},{"id":"ceb9f7b78951b4a6","type":"debug","z":"d1395164b4eec73e","name":"debug 2577","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":7460,"wires":[]}]

```

As you also need to create a temp property to hold the values before moving them to msg.payload.  
[How to import/export a flow](https://nodered.org/docs/user-guide/editor/workspace/import-export)

@Steve-Mcl sorry replied to wrong post.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [6 October 2024 08:50 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/15 "2024-10-06T08:50:22Z")

</div>

> [@E1cid](#):
>
> As you also need to create a temp property to hold the values before moving them to msg.payload.

Bah, it was early & pre-coffee. Thanks for clarifying this for the OP. (I should delete my terrible example 😃 )

---

<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:** [6 October 2024 08:54 UTC](https://discourse.nodered.org/t/retrieve-multiple-values-from-objects/92161/16 "2024-10-06T08:54:35Z")

</div>

Saturday tipple maybe?

Thought I better clarify as the OP may be more confused.
