📅  最后修改于: 2022-03-11 15:02:09.901000             🧑  作者: Mango
// one liner solution to get a unique array by object id
[{_id: 10},{_id: 20}, {_id: 20}].filter((item, i, ar) => ar.findIndex(each => each._id === item._id) === i)