Generating an array of unique values of a specific property in an object array
I know this is an old post but purely for those looking for ways to do this heres a way that I found works nicely with a single line



var table = [
  {
    a:1,
    b:2
  },
  {
    a:2,
    b:3
  },
  {
    a:1,
    b:4
  }
];

let result = [...new Set(table.map(item =&gt; item.a))];
document.write(JSON.stringify(result));