我有一个像这样的数组:
[
#<ArtLookup ARL_ART_ID: 1248525, ARL_SEARCH_NUMBER: "4502696", ARL_KIND: 3, ARL_BRA_ID: 569, ARL_DISPLAY_NR: "4502696", ARL_DISPLAY: nil, ARL_BLOCK: 1, ARL_SORT: 1>,
#<ArtLookup ARL_ART_ID: 1248525, ARL_SEARCH_NUMBER: "5009285", ARL_KIND: 3, ARL_BRA_ID: 525, ARL_DISPLAY_NR: "5009285", ARL_DISPLAY: nil, ARL_BLOCK: 1, ARL_SORT: 1>,
#<ArtLookup ARL_ART_ID: 1248525, ARL_SEARCH_NUMBER: "5016786", ARL_KIND: 3, ARL_BRA_ID: 525, ARL_DISPLAY_NR: "5016786", ARL_DISPLAY: nil, ARL_BLOCK: 2, ARL_SORT: 1>,
...
]
如何从这个哈希数组中删除重复值?
arr.uniq
没有帮助我。
我需要按ARL_DISPLAY_NR
字段删除重复项。我怎样才能做到这一点?