concatenate nested array property of an object

I have a JSONLines file containing thousands of items and I need to merge all of them but for arrays instead of merge need to concatenate them. I don’t have the item schema so need to dynamically do this.

{title: 'test', data: [1]}
{title: 'test', data: [2]}
{title: 'test1', data: [3]}

and output will be something like this

{title: 'test1', data: [1,2,3]}

not sure what is the best performing way I can do.