# Extract values from Json Object

**URL:** <https://discourse.nodered.org/t/extract-values-from-json-object/52906>\
**Category:** General\
**Created:** [28 October 2021 18:14 UTC](https://discourse.nodered.org/t/extract-values-from-json-object/52906 "2021-10-28T18:14:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr.816](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Mr.816](https://discourse.nodered.org/u/Mr.816)\
**Post date:** [28 October 2021 18:14 UTC](https://discourse.nodered.org/t/extract-values-from-json-object/52906/1 "2021-10-28T18:14:32Z")

</div>

Hello,

I'm using a great node to connect a universal robot to node red.  
The connection works finde and I'm getting Json Data from the robot.  
I would like to pick certain values from this json object and display them on a dashboard.  
Can anyone tell me how to proceed and extract certain values for example position actual (see foto below) and display them on a dashboard?

 ![56346792-322f7a00-61c3-11e9-8b25-a4cb57e938e4](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/6/a61ddfcef2123dea712ae75c6f1b6de93174cbe3.png)

The node and a small description can be found here:  
[https://flows.nodered.org/node/node-red-contrib-ur-robot](https://flows.nodered.org/node/node-red-contrib-ur-robot)

Thank you so much!

---

<div class="post-metadata">

**Author:** ![Hubertus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hubertus/32/10077_2.png) [@Hubertus](https://discourse.nodered.org/u/Hubertus)\
**Post date:** [28 October 2021 19:49 UTC](https://discourse.nodered.org/t/extract-values-from-json-object/52906/2 "2021-10-28T19:49:57Z")

</div>

msg.payload.jointData[0].positionActual will be the solution - you can display this direct in a text node  
br  
Hubertus

---

<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:** [28 October 2021 21:28 UTC](https://discourse.nodered.org/t/extract-values-from-json-object/52906/3 "2021-10-28T21:28:00Z")

</div>

There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

![BX00Cy7yHi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

[https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

---

<div class="post-metadata">

**Author:** ![Mr.816](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Mr.816](https://discourse.nodered.org/u/Mr.816)\
**Post date:** [29 October 2021 05:36 UTC](https://discourse.nodered.org/t/extract-values-from-json-object/52906/4 "2021-10-29T05:36:48Z")

</div>

Thank you so much for your answers!  
If I want to use for example a gauge or graph to display the values can I use these nodes directly or do I need a change node or something to set the message payload to the value using the path?

Thanks!

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [29 October 2021 07:47 UTC](https://discourse.nodered.org/t/extract-values-from-json-object/52906/5 "2021-10-29T07:47:02Z")

</div>

Make sure to go through all [these essential videos](https://www.youtube.com/watch?v=ksGeUD26Mw0&list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6) to understand how node-red works.

Every node has a help function, in the info tab. Select the node and read the help.

---

<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:** [29 October 2021 08:49 UTC](https://discourse.nodered.org/t/extract-values-from-json-object/52906/6 "2021-10-29T08:49:13Z")

</div>

You can use the gauge node directly, you can choose which property you wish to display.  
eg in the value format field  
`{{msg.payload.jointData[0].positionActual}}`  
or if you want to round the dispay  
`{{msg.payload.jointData[0].positionActual | number:3}}`

This is all in the help text, use the book icon in the side panel.

In the graph node you would move your value to msg.payload using a change or function or template node. you would also set a msg.topic.

---

<div class="post-metadata">

**Author:** ![Mr.816](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Mr.816](https://discourse.nodered.org/u/Mr.816)\
**Post date:** [8 November 2021 12:58 UTC](https://discourse.nodered.org/t/extract-values-from-json-object/52906/7 "2021-11-08T12:58:50Z")

</div>

Dear All,

sorry for my late reply.  
I want to thank all of you for the very useful comments and your input.  
I was able to extract the data and visualize it on the dashboard.

Thank you very much again!

---

<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:** [7 January 2022 12:59 UTC](https://discourse.nodered.org/t/extract-values-from-json-object/52906/8 "2022-01-07T12:59:20Z")

</div>

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