How to merge list(map) outputs in terraform as combined map

I am getting terraform output as below:

output = [
{
     "a" = "b",
     "c" = "d",
     "e" = "f",
},
{
     "g" = "h",
}
]

Trying to format or convert the output as below.

Expecting output as:

output = {
     "a" = "b",
     "c" = "d",
     "e" = "f",
     "g" = "h",
}

Is it possible. Thanks in advance.

Nevermind, got it working with zipmap(flatten).