A little more sophisticated as my question mentioned below. I learned to use arrays more, but it screws things up too.
Input:
{
"a": [
{
"b": "c",
"d": "e"
},
{
"b": "f",
"d": "g"
}
],
"h": [
{
"b": "c",
"i": "j"
},
{
"b": "f",
"i": "k"
}
]
}
desired output:
{
"l": [
{
"b": "c",
"d": "e",
"i": "j"
},
{
"b": "f",
"d": "g",
"i": "k"
}
]
}
Things that I've tried, based up on JQ How to merge multiple objects into one
{ x: [ inputs | .a[] | { (.h[]): .i } ] | add}