title: Joining two JSON objects in Node-RED
body: <p>it's pretty simple. I have two flows in <strong>Node-RED</strong>, each of them carrying a <strong>JSON object</strong>.</p>
  
  <p>As you can see here: </p>
  
  <p><a href="https://i.stack.imgur.com/8dtub.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8dtub.png" alt="Overview"></a>
  Originally on the first path, I created a new JSON object using the Template Node, which then was passed to the next node. Which works just fine.</p>
  
  <p>Now, I have <strong>two flows</strong> from which I want to extract data.</p>
  
  <p>Problem: The Template node only takes one input at a time. 
  The result is two separated new JSON objects. </p>
  
  <p>But, my target case is this combined JSON object:</p>
  
  <pre><code>{
      "followupEventInput": {
          "name": "{{response.prevIntent}}-{{response.utterances_tone.0.tones.0.tone_id}}",
          "parameters": {
              "tone_id": "{{response.utterances_tone.0.tones.0.tone_id}}"
          },
          "languageCode": "en-US"
    }
  }
  </code></pre>
  
  <p><code>response.utterances_tone.0.tones.0.tone_id</code> coming from the first flow.</p>
  
  <p><code>response.prevIntent</code> coming from the second flow.</p>
  
  <p>It's not possible to pass the information I need through the first flow, because the information gets lost when passing the Tone Analyzer node.</p>
  
  <p>I tried to work with Split &amp; Join nodes but it just gets messy.</p>
  
  <p>Have you any idea how this could be implemented smoothly?</p>