Google Sheet - Get Unique Data from a Sheet

A good feature in google sheet could be the possibility on the “Read” Operation in add options would be getUniqueRows. Where the workflow will get all data of sheet and will retrieve just unique data based on a column that you should identify.
I’m using this script in function to do this job.

  const result = [];
  const map = new Map();
  for (const item of items) {
      if(!map.has(item.json[{{COLUMN}}])){ // {{COLUMN}} is the column name that you want to unique values.
          map.set(item.json[{{COLUMN}}], true);    // set any value to Map
          result.push(item);
      }
  }


return result