Wild card or variable attribute in JavaScript object as payload? Crazy question... right? Let me explain, I have an MQTT message I want to 'parse' the payload in a unique way, but I suspect I will need to use a function node rather than a switch node? Below is the payload structure:
(parent object attribute)
(child attribute)
(child attribute)
The message payload data structure can be one or more elements of an array, as a parent object in an object. I only need to test one of the attributes in the child object as an item in the array.
So msg.payload.., for example msg.payload.23.1 or msg.payload.23.0, or payload.22.0, or msg.payload.21.0. But the MQTT message the first is variable. So if I use a typical switch node, I need a test for each value, then forward the message to an additional switch node to handle the 0,1 values.
If msg.payload.* or even payload.+ could be the defined property (name or string) then I could do something like payload.+.1 or payload.+.0 or payload..1 or payload..0 and avoid the additional switch node? But I think that is not possible in some way or is it?

The message will often have just 1 key, but many are possible depending on what the sensors return. The sensors are in clusters and one or more fire based on the circumstances. I just need to determine if one of many has changed state in the flow, hence the idea of payload.*.state = 0 or 1. As I said it is a unique use case.