 <p>This is my solution:</p> <pre><code>foreach ($arr1[0] as $key =&gt; $entry) { $arr1[0][$key][$arr1[0][$key]["Str1"]] = $arr2[0][$entry["Str1"]]; } </code></pre> <p>This produces the following output:</p> <pre><code>[ [ { "Str1":"ABC", "Str2":"Some Value", "Str3":"Something", "ABC":"Hello" }, { "Str1":"DEF", "Str2":"Another Value", "Str3":"Test", "DEF":"Test" }, { "Str1":"GHI", "Str2":"NULL", "Str3":"Blah", "GHI":"Something" } ] ] </code></pre>