This is a continuation of solution described in Combine json arrays by key, javascript, except that the input json has deeper level of nested array objects:
json1 = [ { &