JSFiddle - React, Tailwind, and code Playground

JavaScript

var data = [
    {foo: [1,2], bar: [3,4]},
    {foo: [5,6]},
];
    
var result = _.reduce(data, function (result, obj) {
    _.each(obj, function (array, key) {
        result[key] = (result[key] || []).concat(array)
    })
    return result
}, {})
    
console.log(result)