# Html post to msg.payload

**URL:** <https://discourse.nodered.org/t/html-post-to-msg-payload/22304>\
**Category:** General\
**Created:** [26 February 2020 20:22 UTC](https://discourse.nodered.org/t/html-post-to-msg-payload/22304 "2020-02-26T20:22:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fredje](https://avatars.discourse-cdn.com/v4/letter/f/ac8455/32.png) [@Fredje](https://discourse.nodered.org/u/Fredje)\
**Post date:** [26 February 2020 20:22 UTC](https://discourse.nodered.org/t/html-post-to-msg-payload/22304/1 "2020-02-26T20:22:49Z")

</div>

I can send through my smartphone a html POST to node red to a .msg payload, it's the number 38 in the attachement,

With which function can i make a msg.payload true if the number is 38, and the msg.payload false if it is not number 38 (or something else), i don't know how i must read the number 38 out of the .msg payload

thank you

frederick

 ![nodered](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/2/9294e1914f8384e7bed7ac716b33bf1bd75bc182.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 February 2020 20:50 UTC](https://discourse.nodered.org/t/html-post-to-msg-payload/22304/2 "2020-02-26T20:50:51Z")

</div>

You can use a Change node configured like this  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/a/bad72a4f0ef4979b182d142f7663b2ec1692bd93.png)

That sets msg.payload to the result of the test `payload=38`. Note that because the expression is JSONata not javascript it is a single `=` not double.

---

<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 2020 20:50 UTC](https://discourse.nodered.org/t/html-post-to-msg-payload/22304/3 "2020-04-26T20:50:55Z")

</div>

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