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.
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
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.