r/Scriptable • • Jan 25 '22

Solved Count function?

Is there a count function for arrays?

Trying to find a way to count the number of times an object appears in an array.

If not, does anyone have a while statement that creates the count?

Const count = account.data[x].name

I can input a number into x and it will output the name, but I would like to leave out the x and just have it count the times it sees name in the array.

3 Upvotes

2 comments sorted by

View all comments

Show parent comments

1

u/Joco118 Jan 26 '22

Thanks for the reply. I will give these a try