Skip to content

Instantly share code, notes, and snippets.

@MarissaJ
Last active August 24, 2022 02:01
Show Gist options
  • Save MarissaJ/8dba98a5d9bb0ee6da3b4b162884299e to your computer and use it in GitHub Desktop.
Save MarissaJ/8dba98a5d9bb0ee6da3b4b162884299e to your computer and use it in GitHub Desktop.
Display number of times an item appears in a spreadsheet column
values = [];
item=thisComp.layer("data 01").text.sourceText.toString();
for(i=0;i<=thisComp.layer("state-gradient.csv")("Data")("Number of Rows")-1;i++) {   
  values.push(thisComp.layer("state-gradient.csv")("Data")("Outline")("Data")("Data " + i).value);
}
values.filter(function(value){
return value === item;
}).length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment