Reputation: 35
I have an array in PHP like this:
[{"pos"=0,"name"="Tom"},{"pos"=1,"name"="John"},{"pos"=2,"name"="Tom"}]
I want to remove duplicates in this array based on "name". In other words, I want to get an array like this:
[{"pos"=0,"name"="Tom"},{"pos"=1,"name"="John"}]
How can we do this?
Upvotes: 0
Views: 97