I'm using underscore, and I'm wondering if there's a more efficient way of accomplishing the following - seems like this should be a function in underscore.
var obj1 = { test: 'hello' },
obj2 = { test: 'hello2' };
var merged = {};
_.each(_.keys(obj1), function(key) { merged[key] = [obj1[key], obj2[key]]; });
console.log(merged);
Also the limitations of this are that any keys in obj2 not present in obj1 will not be counted - it would be nice if I could get something akin to a full outer join, where the value of one side or the other will be null if it doesn't exist. Also, it would be nice if this wasn't limited to two objects.