jq: recursively merge objects and concatenate arrays
Here is a generic function that recursively combines two composite JSON entities by concatenating arrays at the same position: # Recursively meld a and b, # concatenating arrays and # favoring b when there is a conflict def meld(a; b): a as $a | b as $b | if ($a|type) == “object” and ($b|type) == … Read more