I need some help in converting JSON array in postgresTO JSON object as below. Please Note the keys are not known in advance, any key can show up in the JSON array. Is there a way to just flatten it out.
INPUT:-
[{"col1": "1", "col2": null, "col3": "7"}, {"col4": "19"}, {"col5": "19", "col6":"18"}]
OUTPUT:-
{"col1": "1", "col2": null, "col3": "7", "col4": "19", "col5": "19", "col6":"18"}
Thank you