EDITED!!
I have an object array
:
Array 0:[{id:"a1" , code:"123" , name:"a"},
{id: "a2", code: "222" , name: "a"},
{id: "b1", code: "433", name: "b"}]
Array 1:[{id:"a1" , code:"123" , name:"a"},
{id: "b2", code: "211" , name: "b"},
{id: "b1", code: "433", name: "b"}]
I want to get the array of object that has no duplicate value for "name". and store it to another array
:
Result:
Array 0:{id: "b1", code: "433", name:"b"}
Array 1: {id:"a1" , code:"123" , name:"a"}
How can I get the array of object that has no duplicate value for name
?
All I found on some thread is to remove duplicates from array and not get the array with no duplicate. Thanks in advance!