# How to extract data from mysql node response?

**URL:** https://discourse.nodered.org/t/how-to-extract-data-from-mysql-node-response/43221
**Category:** General
**Created:** [25 March 2021 22:13 UTC](https://discourse.nodered.org/t/how-to-extract-data-from-mysql-node-response/43221 "2021-03-25T22:13:41Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![RMILIOussama](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rmilioussama/32/37617_2.png) [@RMILIOussama](https://discourse.nodered.org/u/RMILIOussama)
#### Post date: [25 March 2021 22:13 UTC](https://discourse.nodered.org/t/how-to-extract-data-from-mysql-node-response/43221/1 "2021-03-25T22:13:41Z")

</div>

Node-Red version : 1.0.6  
I want to extract some data from DataBase MySQL response to do some other operation !

```auto
[{"id":"b3dfdc6d.e7775","type":"function","z":"ccdfe680.e48b48","name":"Get data","func":"msg.topic = msg.payload.Press\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":280,"wires":[["6a5c8fa2.8bd9d"]]}]

```

 ![NodeRed](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/9/097534302c02023b74912a14ba978acd92ce1cc2.png)

---

<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: [25 March 2021 22:24 UTC](https://discourse.nodered.org/t/how-to-extract-data-from-mysql-node-response/43221/2 "2021-03-25T22:24:01Z")

</div>

> [@RMILIOussama](#):
>
> I want to extract some data from DataBase MySQL

Extract it to where?

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.

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

---

<div class="post-metadata">

### Author: ![RMILIOussama](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rmilioussama/32/37617_2.png) [@RMILIOussama](https://discourse.nodered.org/u/RMILIOussama)
#### Post date: [26 March 2021 11:17 UTC](https://discourse.nodered.org/t/how-to-extract-data-from-mysql-node-response/43221/3 "2021-03-26T11:17:06Z")

</div>

Thanks Steve-Mcl,

When I ask it here is because I already read this link and made a hundred attempts without success, the idea is to be able to access directly the data like 'Press'.

Regards

---

<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: [26 March 2021 11:37 UTC](https://discourse.nodered.org/t/how-to-extract-data-from-mysql-node-response/43221/4 "2021-03-26T11:37:08Z")

</div>

What do you see when you use Copy Path from the debug pane as explained in that link?

---

<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: [26 March 2021 11:53 UTC](https://discourse.nodered.org/t/how-to-extract-data-from-mysql-node-response/43221/5 "2021-03-26T11:53:45Z")

</div>

> [@RMILIOussama](#):
>
> the idea is to be able to access directly the data like 'Press'.

Hover your mouse pointer over "press" in the debug panel. Do you see some buttons appear?

It is clearly documented and demonstrated in that link.

---

<div class="post-metadata">

### Author: ![RMILIOussama](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rmilioussama/32/37617_2.png) [@RMILIOussama](https://discourse.nodered.org/u/RMILIOussama)
#### Post date: [26 March 2021 12:52 UTC](https://discourse.nodered.org/t/how-to-extract-data-from-mysql-node-response/43221/6 "2021-03-26T12:52:15Z")

</div>

I tried but didn't work!

---

<div class="post-metadata">

### Author: ![RMILIOussama](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rmilioussama/32/37617_2.png) [@RMILIOussama](https://discourse.nodered.org/u/RMILIOussama)
#### Post date: [26 March 2021 12:56 UTC](https://discourse.nodered.org/t/how-to-extract-data-from-mysql-node-response/43221/7 "2021-03-26T12:56:50Z")

</div>

Yes I tried it 'copy path' but nothing!  
Maybe the object does not have a name that's why it did not work

---

<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: [26 March 2021 12:59 UTC](https://discourse.nodered.org/t/how-to-extract-data-from-mysql-node-response/43221/8 "2021-03-26T12:59:07Z")

</div>

> [@RMILIOussama](#):
>
> Yes I tried it 'copy path' but nothing!

what happens if you copy path then open a text editor (notepad) and paste.

> [@RMILIOussama](#):
>
> Maybe the object does not have a name that's why it did not work

The item most certainly does have a name.

edit - its becoming clear you are quite unfamiliar with many of the very basic parts of node-red.

do yourself a favour (and us 😉 ) watch 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: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [25 May 2021 12:59 UTC](https://discourse.nodered.org/t/how-to-extract-data-from-mysql-node-response/43221/9 "2021-05-25T12:59:31Z")

</div>

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