function uniqueByProperty(items, propName) {
  const posts = Array.from(items.reduce((map, item) => {
    return map.set(item[propName], item);
  }, new Map()).values());
  return posts;
}
Unique items based on obj property.
@param {!Array} items
@param {string} propName Property name to filter on.
@return {!Array} unique array of items