# Merge two payload messages based on same value in both payloads

**URL:** <https://discourse.nodered.org/t/merge-two-payload-messages-based-on-same-value-in-both-payloads/93562>\
**Category:** General\
**Created:** [29 November 2024 07:59 UTC](https://discourse.nodered.org/t/merge-two-payload-messages-based-on-same-value-in-both-payloads/93562 "2024-11-29T07:59:46Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [29 November 2024 08:31 UTC](https://discourse.nodered.org/t/merge-two-payload-messages-based-on-same-value-in-both-payloads/93562/4 "2024-11-29T08:31:56Z")

</div>

Have a look at this thread about merging messages...

> [@Merging Values to a single payload](https://discourse.nodered.org/t/merging-values-to-a-single-payload/92947/2):
>
> It is unclear to me what your problem is since you don't explain what the sources of the data are (what nodes they are), how you inject 'inject' the data. Please create a small flow demonstrating your problem and post it to a reply. In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```) ``` code goes here ``` You can edit and correct your post by clicking the pencil pencil2 icon. See this post…

Might be worth taking a look at this CookBook article as well...  
[https://cookbook.nodered.org/basic/join-streams](https://cookbook.nodered.org/basic/join-streams)

**EDIT:**  
The above method relies on the input messages to be merged having DIFFERENT topic-names.  
It is unclear what the topic-name is for your two sets of incoming data and whether a unique topic-name could be applied (at the source where the data is created).

---

_[View the full topic](https://discourse.nodered.org/t/merge-two-payload-messages-based-on-same-value-in-both-payloads/93562)._
