Quick actions

cmd+k|ctrl+k

Navigation

Languages

Remove duplicates

Snippet info

Language

JavaScript

Visibility

public

Author

marty

Created

2018-01-06T22:29:28Z

Updated

2018-01-06T22:30:35Z

const applications = [
  {
    "name": "etherpad",
    "state": "running"
  },
  {
    "name": "etherpad",
    "state": "initialize"
  },
  {
    "name": "wordpress",
    "state": "running"
  }
];

const test = applications.filter((app, index, self) => {
    return index === self.findIndex(a => (
        app.name === a.name
    ));
});

console.log(test);
INFO