# Use switch node to identify path?

**URL:** <https://discourse.nodered.org/t/use-switch-node-to-identify-path/61204>\
**Category:** General\
**Created:** [12 April 2022 21:55 UTC](https://discourse.nodered.org/t/use-switch-node-to-identify-path/61204 "2022-04-12T21:55:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [12 April 2022 21:55 UTC](https://discourse.nodered.org/t/use-switch-node-to-identify-path/61204/1 "2022-04-12T21:55:04Z")

</div>

I'm receiving the following status messages originating via MQTT;

![switch](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/8/38046f7d50d8461c104eb05959470e75be272e6b.jpeg)

...and trying to use a switch node to discriminate between `msg.payload.POWER` and `msg.payload.Delay`. Is this possible with a switch node?  
I can of course use a function node and javascript, or maybe 2 switch nodes, but thought that this should maybe be an option for a single switch node, or am I (probably) missing the obvious?

---

<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:** [12 April 2022 22:12 UTC](https://discourse.nodered.org/t/use-switch-node-to-identify-path/61204/2 "2022-04-12T22:12:35Z")

</div>

test msg.payload "has key" POWER

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [12 April 2022 22:16 UTC](https://discourse.nodered.org/t/use-switch-node-to-identify-path/61204/3 "2022-04-12T22:16:52Z")

</div>

Thanks Dave.  
I can see the logic now 😀

---

<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:** [26 April 2022 22:17 UTC](https://discourse.nodered.org/t/use-switch-node-to-identify-path/61204/4 "2022-04-26T22:17:24Z")

</div>

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