# How to parse from complete msg object

**URL:** <https://discourse.nodered.org/t/how-to-parse-from-complete-msg-object/34086>\
**Category:** General\
**Created:** [11 October 2020 07:59 UTC](https://discourse.nodered.org/t/how-to-parse-from-complete-msg-object/34086 "2020-10-11T07:59:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![John245](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@John245](https://discourse.nodered.org/u/John245)\
**Post date:** [11 October 2020 07:59 UTC](https://discourse.nodered.org/t/how-to-parse-from-complete-msg-object/34086/1 "2020-10-11T07:59:02Z")

</div>

In case the output of a function is a msg payload it is simple to retrieve the info. In that case the copy path function can be used and that can be pasted in the expression field.

But in this case I have a complete msg object.

![Capture. msg object](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/3/b3e0588f3501e474c6137e5baf92d1c846322569.png)

How can I in this case get the info from the payload? For e.g. the fabNumber?

I tried to put the following in the switch node: payload["000160171557"].ident.deviceIdentLabel.fabNumber

![Capture switch](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/d/cd9a7b7e3f942609b5b8037cd4b0e79f3f6a3121.png)

But that will give no result in the Debug node.

* * *

John

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [11 October 2020 08:14 UTC](https://discourse.nodered.org/t/how-to-parse-from-complete-msg-object/34086/2 "2020-10-11T08:14:09Z")

</div>

If you are just needing to get the info, then maybe a change node is more appropriate ? Use it to move that path to msg.payload ?

---

<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:** [11 October 2020 08:16 UTC](https://discourse.nodered.org/t/how-to-parse-from-complete-msg-object/34086/3 "2020-10-11T08:16:49Z")

</div>

msg.payload is an object and will never equal payload["000160171557"].ident.deviceIdentLabel.fabNumber.

Not sure what you want to do, but if you wish to compare payload["000160171557"].ident.deviceIdentLabel.fabNumber, try using that in the property field.

---

<div class="post-metadata">

**Author:** ![John245](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@John245](https://discourse.nodered.org/u/John245)\
**Post date:** [11 October 2020 08:21 UTC](https://discourse.nodered.org/t/how-to-parse-from-complete-msg-object/34086/4 "2020-10-11T08:21:58Z")

</div>

Thanks, this did the trick.

* * *

John

---

<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 October 2020 08:21 UTC](https://discourse.nodered.org/t/how-to-parse-from-complete-msg-object/34086/5 "2020-10-25T08:21:59Z")

</div>

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