# Filter for Payload message

**URL:** https://discourse.nodered.org/t/filter-for-payload-message/29067
**Category:** General
**Created:** [27 June 2020 14:18 UTC](https://discourse.nodered.org/t/filter-for-payload-message/29067 "2020-06-27T14:18:40Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Flixm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/flixm/32/17122_2.png) [@Flixm](https://discourse.nodered.org/u/Flixm)
#### Post date: [27 June 2020 14:18 UTC](https://discourse.nodered.org/t/filter-for-payload-message/29067/1 "2020-06-27T14:18:40Z")

</div>

Hi,  
i need some help to filter only the "illuminance\_lux":xxx value.

the message that i receive looks like this:

payload: "illuminance":20935,"illuminance\_lux":123,"linkquality":0,"battery":100,"voltage":3100}"

and i only need the value "123" for example. How can i extract this value

thanks in advance

Felix

---

<div class="post-metadata">

### Author: ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)
#### Post date: [27 June 2020 14:32 UTC](https://discourse.nodered.org/t/filter-for-payload-message/29067/2 "2020-06-27T14:32:25Z")

</div>

If you go to the debug tab in the sidebar you can copy the path to an object property with the first of the three icons that are next to it

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/3/f3434dca2fdda6aa941fbe08e70683e82ee1ba61.jpeg)  
Than you can use this copied path in a change node  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/2/d2eaf6821fc4d6698871949dc29e3966669e7308.jpeg)

Johannes

---

<div class="post-metadata">

### Author: ![Flixm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/flixm/32/17122_2.png) [@Flixm](https://discourse.nodered.org/u/Flixm)
#### Post date: [27 June 2020 14:38 UTC](https://discourse.nodered.org/t/filter-for-payload-message/29067/3 "2020-06-27T14:38:34Z")

</div>

No, the payload is full of other values like this

 ![Unbenannt](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/8/7809d3988937bdbfcb2482a65206c630b021fd8f.jpeg)

---

<div class="post-metadata">

### Author: ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)
#### Post date: [27 June 2020 14:42 UTC](https://discourse.nodered.org/t/filter-for-payload-message/29067/4 "2020-06-27T14:42:18Z")

</div>

Your payload is a json string representation of a javascript object than. Simply feed it through the json node from the palette first and it will be parsed to a nice javascript object where you can use the above method.  
Where is that value coming from? If its from an mqtt node you can actually select in the mqtt in node to parse the value and emit it already transformed to a nice workable js object.

---

<div class="post-metadata">

### Author: ![Flixm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/flixm/32/17122_2.png) [@Flixm](https://discourse.nodered.org/u/Flixm)
#### Post date: [27 June 2020 14:53 UTC](https://discourse.nodered.org/t/filter-for-payload-message/29067/5 "2020-06-27T14:53:34Z")

</div>

I`ll try that ...

---

<div class="post-metadata">

### Author: ![Flixm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/flixm/32/17122_2.png) [@Flixm](https://discourse.nodered.org/u/Flixm)
#### Post date: [27 June 2020 19:35 UTC](https://discourse.nodered.org/t/filter-for-payload-message/29067/6 "2020-06-27T19:35:15Z")

</div>

Thx... it´s solved !

---

<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 July 2020 19:35 UTC](https://discourse.nodered.org/t/filter-for-payload-message/29067/7 "2020-07-11T19:35:20Z")

</div>

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