# How do I extract data from an object inside an object?

**URL:** <https://discourse.nodered.org/t/how-do-i-extract-data-from-an-object-inside-an-object/4154>\
**Category:** General\
**Created:** [21 October 2018 05:35 UTC](https://discourse.nodered.org/t/how-do-i-extract-data-from-an-object-inside-an-object/4154 "2018-10-21T05:35:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [21 October 2018 05:35 UTC](https://discourse.nodered.org/t/how-do-i-extract-data-from-an-object-inside-an-object/4154/1 "2018-10-21T05:35:24Z")

</div>

I have an _Alexa Local_ node that provides this data when I tell Alexa: "Set the landing light to 50%"

```
msg.payload : string[54]
"{"data":{"entity_id":"light.landing","brightness":50}}"

```

Alexa responds with a brightness value from 0 to 100%, but the light I am controlling needs a value from 0 to 255. The _Map_ node should do this, but how, please, do I extract the value of brightness?

Thanks

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [21 October 2018 06:28 UTC](https://discourse.nodered.org/t/how-do-i-extract-data-from-an-object-inside-an-object/4154/2 "2018-10-21T06:28:33Z")

</div>

Hi @SteveMann

The docs have a section of working with messages: [https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

It covers understanding the structure of your message, the difference between a JSON string and a parsed object, and how to identify the path to address any message element.

Rather than repeat that content here, please have a read, and ask if anything isn't clear.

Nick
