How would I go about combining these sets of arrays so that they are joined together and there are no duplicate values?
Not sure if lodash has something to help with this, most of the other answers I have found are based on the arrays being flat, but that structure of my data set has them nested.
Thanks for your help!
let arr1 = [
["name", "id", 'age'],
["Susan", "3", '20'],
["John", "1", '21'],
["Bob", "2", '23'],
["Ben", "4", '20']
];
let arr2 = [
["name", "id", 'height'],
["Bob", "2", '50'],
["John", "1", '45'],
["Ben", "4", '43'],
["Susan", "3", '48'],
];
let arr3 = [
["name", "id", 'parent'],
["Bob", "2", 'yes'],
["John", "1", 'yes'],
];
//desired output
// [
// ['name', 'id', 'age', 'height', 'parent'],
// ["Susan", "3", '20', '48', ''],
// ["John", "1", '21', '45', 'yes'],
// ["Bob", "2", '23', '50', 'yes'],
// ["Ben", "4", '20', '43', '']
// ]