Combine 2 json using a key
<p>Suppose i have</p>

<p>Json1:</p>

<pre><code>[
   {  
      "key":"1",
      "val2":"5",
      "val3":"short",
      "val4":"pant",
      "val5":"blue",
   },
   {  
      "key":"2",
      "val2":"6",
      "val3":"long",
      "val4":"shirt",
      "val5":"red",
   }
]
</code></pre>

<p>And I have Json2:</p>

<pre><code>[
   {  
      "key":"1",
      "qty":"3"
   },
   {  
      "key":"2",
      "qty":"6",
   }
]
</code></pre>

<p>I would like to have the following results 
Json3:</p>

<pre><code>[
   {  
      "key":"1",
      "val2":"5",
      "val3":"short",
      "val4":"pant",
      "val5":"blue",
      "qty":"3"
   },
   {  
      "key":"2",
      "val2":"6",
      "val3":"long",
      "val4":"shirt",
      "val5":"red",
      "qty":"6"
   }
]
</code></pre>

<p>is there a way to combine using a key in my case I would want to use the "key" as the key to know what qty to place where.</p>

<p>I'm trying to achieve a similar effect of an inner join to combine them that way.</p>

<p>Thanks,</p>