Hope you guys help me below question :
- I have below 2 rows
2. I want to use google app script to pull out the unique values like : HTS, WDS, HH 3. So I write below codes :
- DATA =SHEET.GETRANGE("J2:O2").GETVALUES();
- UNIQUELIST=[];
- DATA.FOREACH(FUNCTION(X){ IF(UNIQUELIST.indexOf(X[0]) === -1 && X[0]!="" ){ UNIQUELIST.push(X[0]);}})
- THE RESULT IS H,W. NOT AS WHAT LOOKING FOR