假设有一个数组是这样[{eid:cat,name:aa},{eid:cat,name:bb},{eid:dog,name:cc},{eid:cat,name:dd},{eid:pig,name:ee},{eid:cat,name:ff},{eid:dog,name:gg}]我想要对数组做处理,将相同的eid放在一起变成[{eid:cat,name:aa},{eid:cat,name:bb},{eid:cat,name:dd},{eid:cat,name:ff},{eid:dog,name:cc},{eid:dog,name:gg},{eid:pig,name:ee}]这有办法实现吗?
慕婉清6462132
相关分类