# Easy question: switch node from payload content

**URL:** <https://discourse.nodered.org/t/easy-question-switch-node-from-payload-content/28071>\
**Category:** General\
**Created:** [9 June 2020 17:20 UTC](https://discourse.nodered.org/t/easy-question-switch-node-from-payload-content/28071 "2020-06-09T17:20:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![get-command](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/get-command/32/25038_2.png) [@get-command](https://discourse.nodered.org/u/get-command)\
**Post date:** [9 June 2020 17:20 UTC](https://discourse.nodered.org/t/easy-question-switch-node-from-payload-content/28071/1 "2020-06-09T17:20:51Z")

</div>

Hi,

I need your help please.

I have this payload-data in the dubug:

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5d04c7055e6252c19dacca2859e70f2404369e3e.png)

i want this in a switch node. If presentValue: 1 then switch 1 / If presentValue: 2 then switch 2:. Like this:

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/466796a0c4638aec44b85887bb4bd1a6eadcaf9a.png)

What i need to do? Thank your for Help!

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [9 June 2020 17:39 UTC](https://discourse.nodered.org/t/easy-question-switch-node-from-payload-content/28071/2 "2020-06-09T17:39:18Z")

</div>

Test msg.payload.presentValue  
Test for a `numeric` 1 or 2

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [9 June 2020 17:42 UTC](https://discourse.nodered.org/t/easy-question-switch-node-from-payload-content/28071/3 "2020-06-09T17:42:34Z")

</div>

This should do it:

 ![2020_06_09_20.41.25_edit](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/5/d559ea03f00abaaf90d7c8e21d1e4995dd2f2628.jpeg)

(The second one should also be numeric like @zenofmud said, although it likely works either way)

---

<div class="post-metadata">

**Author:** ![get-command](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/get-command/32/25038_2.png) [@get-command](https://discourse.nodered.org/u/get-command)\
**Post date:** [9 June 2020 18:43 UTC](https://discourse.nodered.org/t/easy-question-switch-node-from-payload-content/28071/4 "2020-06-09T18:43:35Z")

</div>

thank you! it works 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:** [23 June 2020 18:43 UTC](https://discourse.nodered.org/t/easy-question-switch-node-from-payload-content/28071/5 "2020-06-23T18:43:37Z")

</div>

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