How to parse from complete msg object

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

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

But that will give no result in the Debug node.


John

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 ?

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.

Thanks, this did the trick.


John

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