# Retrieving variables from payload object

**URL:** <https://discourse.nodered.org/t/retrieving-variables-from-payload-object/13101>\
**Category:** General\
**Created:** [10 July 2019 11:02 UTC](https://discourse.nodered.org/t/retrieving-variables-from-payload-object/13101 "2019-07-10T11:02:36Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![KMBN](https://avatars.discourse-cdn.com/v4/letter/k/e495f1/32.png) [@KMBN](https://discourse.nodered.org/u/KMBN)\
**Post date:** [10 July 2019 11:34 UTC](https://discourse.nodered.org/t/retrieving-variables-from-payload-object/13101/5 "2019-07-10T11:34:30Z")

</div>

Excellent, thanks. I had forgotten about that. The strange thing is, though, that even when I copy the path to DeviceId, which is allegedly "payload[0].DeviceId", I get nothing. Or actually, I get the error that this is not defined. I then put "msg." in front of it, but then there is just no trace of this in the debug node.

Anyways, is there an easier way of getting around this? I am currently using the json node to convert json data into an object, but what I really want is to get the information converted to variables with names and values. If this is in an array and/or an object is not important, though it seems to be my main problem right now.

---

_[View the full topic](https://discourse.nodered.org/t/retrieving-variables-from-payload-object/13101)._
