I want to get the first one if there are duplicates and discard everything if the name is the same.
Model
var data = [
{id:1, name:"Jay"},{id:2, name:"Jay"}
{id:3, name:"Jay"},{id:4, name:"Jay"}
]
wish to get
var result =[
{id:1, name:"Jay"}
]