I have an object that looks like this:
[{
"id": 3298,
"kanji": "籲",
"part": "一 | 亅 个 ハ 冂 口 目 冊 竹 貝 頁 龠 廾",
"createdAt": "2018-04-16T02:27:33.993Z",
"updatedAt": "2018-04-16T02:27:33.993Z"
}, {
"id": 5801,
"kanji": "龥",
"part": "一 | 亅 个 ハ 冂 口 廾 目 冊 貝 頁 龠",
"createdAt": "2018-04-16T02:27:34.102Z",
"updatedAt": "2018-04-16T02:27:34.102Z"
}]
I would like to combine this with an array that holds unique the kanji and part and remove the duplicate part. I want it to return the result as follows
{
"kanji": ["籲", "龥"],
"part": ["一", "|", "亅", "个", "ハ", "冂", "口", "目", "冊", "竹", "貝", "頁", "龠", "廾"]
}
How can I use the lodash to do it?