# Compare msg.payload numbers

**URL:** <https://discourse.nodered.org/t/compare-msg-payload-numbers/44867>\
**Category:** General\
**Created:** [28 April 2021 14:00 UTC](https://discourse.nodered.org/t/compare-msg-payload-numbers/44867 "2021-04-28T14:00:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![martini\_geek](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@martini\_geek](https://discourse.nodered.org/u/martini_geek)\
**Post date:** [28 April 2021 14:00 UTC](https://discourse.nodered.org/t/compare-msg-payload-numbers/44867/1 "2021-04-28T14:00:07Z")

</div>

I have 2 function nodes which gives output as -  
f1 node output : msg.payload.number - 123  
f2 node output : msg.payload.number - 456  
if f1==f2 then popup=employeeid.  
This should show a popup with employeeid in worldmap  
Could anyone please help how I can achieve this

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 April 2021 15:26 UTC](https://discourse.nodered.org/t/compare-msg-payload-numbers/44867/2 "2021-04-28T15:26:57Z")

</div>

> [@martini\_geek](#):
>
> Could anyone please help how I can achieve this

Which are you struggling with comparing the two numbers or generating the world map entry?

Also show us your flow - I suspect the two values are in separate messages but I cannot tell from your description.

---

<div class="post-metadata">

**Author:** ![martini\_geek](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@martini\_geek](https://discourse.nodered.org/u/martini_geek)\
**Post date:** [28 April 2021 15:56 UTC](https://discourse.nodered.org/t/compare-msg-payload-numbers/44867/3 "2021-04-28T15:56:31Z")

</div>

Here is my flow :  
[https://docs.google.com/document/d/1i5PCGMtCn08LK3MErH-CczySyK42Pllj2d3G3ersmWs/edit?usp=sharing](https://docs.google.com/document/d/1i5PCGMtCn08LK3MErH-CczySyK42Pllj2d3G3ersmWs/edit?usp=sharing)

So I want to compare the output of text input node and the output of function node before worldmap node.  
function node output : msg.payload.delivery\_id --\> received from mqtt  
text input node output : msg.payload (which is also a delivery id) --\> manually entered  
I want to compare these 2 and if they are equal I want to add a popup in worldmap..

---

<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:** [27 June 2021 15:57 UTC](https://discourse.nodered.org/t/compare-msg-payload-numbers/44867/4 "2021-06-27T15:57:02Z")

</div>

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