How to remove/replace square brackets and extra curly braces in a json file using expressions in mapper

Hi Team,

I want to remove the square brackets and extra curly braces in the given json file to convert the json file to expression file. My input file is as below.

[
{
“Test”: {
“xyx”: “x”,
“abc”: “a”,
“pqr”: “p”
}
},
{
“Test1”: {
“opq”: “o”,
“stu”: “s”,
}
}
]

But I want to convert the above file as below.

{
“Test”: {
“xyx”: “x”,
“abc”: “a”,
“pqr”: “p”
},

"Test1": {
  "opq": "o",
  "stu": "s"
}

}

Any suggestions like how I can achieve this.